homebridge-config-ui-x 5.0.0-beta.76 → 5.0.0-beta.78

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 (93) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/config.schema.json +1 -1
  3. package/dist/core/auth/auth.controller.d.ts +1 -1
  4. package/dist/core/config/config.service.d.ts +4 -4
  5. package/dist/core/config/config.service.js +15 -10
  6. package/dist/core/config/config.service.js.map +1 -1
  7. package/dist/modules/server/server.controller.d.ts +6 -1
  8. package/dist/modules/server/server.controller.js +51 -2
  9. package/dist/modules/server/server.controller.js.map +1 -1
  10. package/dist/modules/server/server.service.d.ts +3 -0
  11. package/dist/modules/server/server.service.js +47 -0
  12. package/dist/modules/server/server.service.js.map +1 -1
  13. package/package.json +1 -1
  14. package/public/chunk-2326LHV5.js +1 -0
  15. package/public/{chunk-DTEN7TFT.js → chunk-2ERO4TAJ.js} +1 -1
  16. package/public/{chunk-5NGLQJJS.js → chunk-2LYLHZ5C.js} +1 -1
  17. package/public/{chunk-3TXWUXFU.js → chunk-3IDLL4EL.js} +1 -1
  18. package/public/{chunk-J4USS3TJ.js → chunk-3JLPI3KL.js} +1 -1
  19. package/public/{chunk-7S7G7E6P.js → chunk-3Q4HYTEE.js} +1 -1
  20. package/public/{chunk-IP3KHS2K.js → chunk-3SXGHQEL.js} +1 -1
  21. package/public/{chunk-CNVA3LLU.js → chunk-3U67UAT7.js} +1 -1
  22. package/public/{chunk-G43HU5Q5.js → chunk-3ZZZY5X3.js} +1 -1
  23. package/public/chunk-4HD3L34U.js +1 -0
  24. package/public/chunk-4SQ4UEKE.js +1 -0
  25. package/public/{chunk-5W6SCDV6.js → chunk-55LG4UN6.js} +1 -1
  26. package/public/{chunk-5BL6PCNR.js → chunk-5GPU7OWP.js} +1 -1
  27. package/public/{chunk-GFBM6MCU.js → chunk-5L7ODYCG.js} +1 -1
  28. package/public/{chunk-ZHNSZ7X2.js → chunk-737XQ2KH.js} +1 -1
  29. package/public/chunk-7XW2AIQK.js +1 -0
  30. package/public/{chunk-GSNP5K6X.js → chunk-AEMRGOI5.js} +1 -1
  31. package/public/{chunk-OVVOFARC.js → chunk-B4IMLRJQ.js} +1 -1
  32. package/public/{chunk-SB7IBDLB.js → chunk-D2Y3VAXH.js} +1 -1
  33. package/public/chunk-DGMC64HN.js +1 -0
  34. package/public/chunk-DIZ5M3NQ.js +1 -0
  35. package/public/{chunk-XH4RYJ6Y.js → chunk-DW3UVCVP.js} +1 -1
  36. package/public/{chunk-66WXYXRV.js → chunk-ER6X47LX.js} +1 -1
  37. package/public/chunk-FIL2HLD3.js +1 -0
  38. package/public/{chunk-Z3ALWMOS.js → chunk-GWEEXEHU.js} +1 -1
  39. package/public/chunk-H5RXNU2C.js +1 -0
  40. package/public/{chunk-BW24SUSK.js → chunk-HLYTDVHC.js} +1 -1
  41. package/public/{chunk-TCJEY6SZ.js → chunk-HP7RQRMI.js} +1 -1
  42. package/public/{chunk-FPB7CGNC.js → chunk-I4MV25YT.js} +1 -1
  43. package/public/{chunk-ETPKWO5V.js → chunk-I5HQA73Q.js} +1 -1
  44. package/public/chunk-J4RKQEF3.js +1 -0
  45. package/public/{chunk-U6S6F3SC.js → chunk-JRGZ4JFW.js} +1 -1
  46. package/public/chunk-JV5TBFNV.js +1 -0
  47. package/public/{chunk-2VTMBAA3.js → chunk-K4QPLGWC.js} +1 -1
  48. package/public/{chunk-MYN3AAWO.js → chunk-K65PVHPY.js} +1 -1
  49. package/public/chunk-LA5SMMMP.js +1 -0
  50. package/public/{chunk-PWSUWMHH.js → chunk-LMKNFAMR.js} +1 -1
  51. package/public/{chunk-WNQ3ZPRR.js → chunk-LUK2UJV7.js} +1 -1
  52. package/public/{chunk-DONFV37G.js → chunk-M2NC6RUH.js} +1 -1
  53. package/public/chunk-MQO3FIAH.js +1 -0
  54. package/public/{chunk-3HFD5GJN.js → chunk-MUQEJXQG.js} +1 -1
  55. package/public/{chunk-UHL5ARSB.js → chunk-MVDCL4GP.js} +1 -1
  56. package/public/{chunk-T6FL3CCM.js → chunk-O4J5FPQM.js} +1 -1
  57. package/public/chunk-P4W6KLQU.js +1 -0
  58. package/public/{chunk-A3GH5UM5.js → chunk-PAOGSB7H.js} +1 -1
  59. package/public/chunk-Q4JKGVDH.js +1 -0
  60. package/public/{chunk-ZRQ5KKRJ.js → chunk-QAEIHR4K.js} +1 -1
  61. package/public/{chunk-GKWVMOET.js → chunk-QL2GME6L.js} +1 -1
  62. package/public/{chunk-HVJ23MRE.js → chunk-QLIPWIAB.js} +1 -1
  63. package/public/{chunk-LUWQZ3SC.js → chunk-TIEKDUGY.js} +1 -1
  64. package/public/{chunk-3KEKNJHK.js → chunk-TT6Q7AVH.js} +1 -1
  65. package/public/chunk-TYJTR2SP.js +1 -0
  66. package/public/{chunk-V2SMMSMC.js → chunk-VFMIRYAL.js} +1 -1
  67. package/public/chunk-VQGJUQIC.js +1 -0
  68. package/public/{chunk-4RLAAHQO.js → chunk-WNFFLLHP.js} +1 -1
  69. package/public/{chunk-6ROJUYIC.js → chunk-WQ6RFH5N.js} +1 -1
  70. package/public/{chunk-OOXWGEYZ.js → chunk-WU5ATTVG.js} +1 -1
  71. package/public/chunk-XPHDI334.js +1 -0
  72. package/public/{chunk-2UMHCTKQ.js → chunk-YIFL4IAE.js} +1 -1
  73. package/public/{chunk-ILUFFLLG.js → chunk-Z5OIMV3G.js} +1 -1
  74. package/public/index.html +1 -1
  75. package/public/main-UF3F3WK3.js +1 -0
  76. package/public/chunk-2IFXAVZX.js +0 -1
  77. package/public/chunk-2LXRWE65.js +0 -1
  78. package/public/chunk-2WSC6B2N.js +0 -1
  79. package/public/chunk-4PXS64Y6.js +0 -1
  80. package/public/chunk-6A5CZTWZ.js +0 -1
  81. package/public/chunk-BCSWG6SE.js +0 -1
  82. package/public/chunk-CX3YFWUG.js +0 -1
  83. package/public/chunk-CZCRTSM7.js +0 -1
  84. package/public/chunk-HLYXUMFJ.js +0 -1
  85. package/public/chunk-ILS4HCUL.js +0 -1
  86. package/public/chunk-IZSJEHPY.js +0 -1
  87. package/public/chunk-S7QXG5F2.js +0 -1
  88. package/public/chunk-T34MBGSG.js +0 -1
  89. package/public/chunk-WXKGTM52.js +0 -1
  90. package/public/chunk-X63C4XBV.js +0 -1
  91. package/public/chunk-YXX7ION6.js +0 -1
  92. package/public/chunk-Z26UR5NK.js +0 -1
  93. package/public/main-RD7O64IM.js +0 -1
@@ -1 +1 @@
1
- import{a as V}from"./chunk-ETPKWO5V.js";import{a as q}from"./chunk-JMCN2SQV.js";import{a as _}from"./chunk-2PGR64P5.js";import{n as B,o as k}from"./chunk-7S2SCSTB.js";import{h as D,k as F}from"./chunk-ZHNSZ7X2.js";import{a as z,b as E}from"./chunk-DJKI5XBW.js";import{$a as m,Ac as i,Bc as r,Gb as b,Lc as S,Nb as h,Ob as s,Pb as l,Qb as p,Ub as L,Xb as d,_a as y,dc as T,ec as C,g as j,h as w,jc as x,kc as I,la as o,lb as $,n as v,ra as u,sa as f}from"./chunk-U4V4ICSI.js";var H=j(q(),1);var A=["logoutput"],X=(()=>{class c{$api=o(F);$log=o(V);$modal=o(B);$toastr=o(D);$translate=o(z);termTarget=S("logoutput");resizeEvent=new v;constructor(){}onWindowResize(){this.resizeEvent.next(void 0)}ngOnInit(){window.document.querySelector("body").classList.add("bg-black"),this.$log.startTerminal(this.termTarget(),{},this.resizeEvent)}ngOnDestroy(){window.document.querySelector("body").classList.remove("bg-black"),this.$log.destroyTerminal()}downloadLogFile(){let t=this.$modal.open(_,{size:"lg",backdrop:"static"});t.componentInstance.title=this.$translate.instant("logs.title_download_log_file"),t.componentInstance.message=this.$translate.instant("logs.download_warning"),t.componentInstance.confirmButtonLabel=this.$translate.instant("form.button_download"),t.componentInstance.faIconClass="fas fa-fw fa-user-secret primary-text",t.result.then(()=>{this.$api.get("/platform-tools/hb-service/log/download",{observe:"response",responseType:"blob"}).subscribe({next:e=>{(0,H.saveAs)(e.body,"homebridge.log.txt")},error:e=>w(this,null,function*(){let n;try{n=JSON.parse(yield e.error.text()).message}catch(a){console.error(a)}this.$toastr.error(n||this.$translate.instant("logs.download.error"),this.$translate.instant("toast.title_error"))})})}).catch(()=>{})}truncateLogFile(){let t=this.$modal.open(_,{size:"lg",backdrop:"static"});t.componentInstance.title=this.$translate.instant("logs.title_truncate_log_file"),t.componentInstance.message=this.$translate.instant("logs.truncate_log_warning"),t.componentInstance.confirmButtonLabel=this.$translate.instant("form.button_delete"),t.componentInstance.confirmButtonClass="btn-danger",t.componentInstance.faIconClass="fas fa-fw fa-circle-exclamation primary-text",t.result.then(()=>{this.$api.put("/platform-tools/hb-service/log/truncate",{}).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("logs.log_file_truncated"),this.$translate.instant("toast.title_success")),this.$log.term.clear()},error:e=>{console.error(e),this.$toastr.error(e.error.message||this.$translate.instant("logs.truncate.error"),this.$translate.instant("toast.title_error"))}})}).catch(()=>{})}static \u0275fac=function(e){return new(e||c)};static \u0275cmp=$({type:c,selectors:[["ng-component"]],viewQuery:function(e,n){e&1&&T(n.termTarget,A,5),e&2&&C()},hostBindings:function(e,n){e&1&&d("resize",function(g){return n.onWindowResize(g)},y)},decls:17,vars:15,consts:[["logoutput",""],[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","my-0","me-2",3,"click","ngbTooltip"],[1,"fas","fa-fw","fa-download"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","my-0","me-0",3,"click","ngbTooltip"],[1,"fas","fa-fw","fa-trash-alt"],[1,"flex-column","d-flex","align-items-stretch","adjust-for-mobile"],["id","log-output",1,"align-self-end","w-100","h-100","mb-1"]],template:function(e,n){if(e&1){let a=L();s(0,"div",1)(1,"div",2)(2,"h3",3),x(3),i(4,"translate"),l()(),s(5,"div",4)(6,"button",5),i(7,"translate"),i(8,"translate"),d("click",function(){return u(a),f(n.downloadLogFile())}),p(9,"i",6),l(),s(10,"button",7),i(11,"translate"),i(12,"translate"),d("click",function(){return u(a),f(n.truncateLogFile())}),p(13,"i",8),l()()(),s(14,"div",9),p(15,"div",10,0),l()}e&2&&(m(3),I(r(4,5,"menu.linux.label_logs")),m(3),h("ngbTooltip",r(7,7,"form.button_download")),b("aria-label",r(8,9,"form.button_download")),m(4),h("ngbTooltip",r(11,11,"form.button_delete")),b("aria-label",r(12,13,"form.button_delete")))},dependencies:[k,E],encapsulation:2})}return c})();export{X as a};
1
+ import{a as V}from"./chunk-I5HQA73Q.js";import{a as q}from"./chunk-JMCN2SQV.js";import{a as _}from"./chunk-2PGR64P5.js";import{n as B,o as k}from"./chunk-7S2SCSTB.js";import{h as D,k as F}from"./chunk-737XQ2KH.js";import{a as z,b as E}from"./chunk-DJKI5XBW.js";import{$a as m,Ac as i,Bc as r,Gb as b,Lc as S,Nb as h,Ob as s,Pb as l,Qb as p,Ub as L,Xb as d,_a as y,dc as T,ec as C,g as j,h as w,jc as x,kc as I,la as o,lb as $,n as v,ra as u,sa as f}from"./chunk-U4V4ICSI.js";var H=j(q(),1);var A=["logoutput"],X=(()=>{class c{$api=o(F);$log=o(V);$modal=o(B);$toastr=o(D);$translate=o(z);termTarget=S("logoutput");resizeEvent=new v;constructor(){}onWindowResize(){this.resizeEvent.next(void 0)}ngOnInit(){window.document.querySelector("body").classList.add("bg-black"),this.$log.startTerminal(this.termTarget(),{},this.resizeEvent)}ngOnDestroy(){window.document.querySelector("body").classList.remove("bg-black"),this.$log.destroyTerminal()}downloadLogFile(){let t=this.$modal.open(_,{size:"lg",backdrop:"static"});t.componentInstance.title=this.$translate.instant("logs.title_download_log_file"),t.componentInstance.message=this.$translate.instant("logs.download_warning"),t.componentInstance.confirmButtonLabel=this.$translate.instant("form.button_download"),t.componentInstance.faIconClass="fas fa-fw fa-user-secret primary-text",t.result.then(()=>{this.$api.get("/platform-tools/hb-service/log/download",{observe:"response",responseType:"blob"}).subscribe({next:e=>{(0,H.saveAs)(e.body,"homebridge.log.txt")},error:e=>w(this,null,function*(){let n;try{n=JSON.parse(yield e.error.text()).message}catch(a){console.error(a)}this.$toastr.error(n||this.$translate.instant("logs.download.error"),this.$translate.instant("toast.title_error"))})})}).catch(()=>{})}truncateLogFile(){let t=this.$modal.open(_,{size:"lg",backdrop:"static"});t.componentInstance.title=this.$translate.instant("logs.title_truncate_log_file"),t.componentInstance.message=this.$translate.instant("logs.truncate_log_warning"),t.componentInstance.confirmButtonLabel=this.$translate.instant("form.button_delete"),t.componentInstance.confirmButtonClass="btn-danger",t.componentInstance.faIconClass="fas fa-fw fa-circle-exclamation primary-text",t.result.then(()=>{this.$api.put("/platform-tools/hb-service/log/truncate",{}).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("logs.log_file_truncated"),this.$translate.instant("toast.title_success")),this.$log.term.clear()},error:e=>{console.error(e),this.$toastr.error(e.error.message||this.$translate.instant("logs.truncate.error"),this.$translate.instant("toast.title_error"))}})}).catch(()=>{})}static \u0275fac=function(e){return new(e||c)};static \u0275cmp=$({type:c,selectors:[["ng-component"]],viewQuery:function(e,n){e&1&&T(n.termTarget,A,5),e&2&&C()},hostBindings:function(e,n){e&1&&d("resize",function(g){return n.onWindowResize(g)},y)},decls:17,vars:15,consts:[["logoutput",""],[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","my-0","me-2",3,"click","ngbTooltip"],[1,"fas","fa-fw","fa-download"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","my-0","me-0",3,"click","ngbTooltip"],[1,"fas","fa-fw","fa-trash-alt"],[1,"flex-column","d-flex","align-items-stretch","adjust-for-mobile"],["id","log-output",1,"align-self-end","w-100","h-100","mb-1"]],template:function(e,n){if(e&1){let a=L();s(0,"div",1)(1,"div",2)(2,"h3",3),x(3),i(4,"translate"),l()(),s(5,"div",4)(6,"button",5),i(7,"translate"),i(8,"translate"),d("click",function(){return u(a),f(n.downloadLogFile())}),p(9,"i",6),l(),s(10,"button",7),i(11,"translate"),i(12,"translate"),d("click",function(){return u(a),f(n.truncateLogFile())}),p(13,"i",8),l()()(),s(14,"div",9),p(15,"div",10,0),l()}e&2&&(m(3),I(r(4,5,"menu.linux.label_logs")),m(3),h("ngbTooltip",r(7,7,"form.button_download")),b("aria-label",r(8,9,"form.button_download")),m(4),h("ngbTooltip",r(11,11,"form.button_delete")),b("aria-label",r(12,13,"form.button_delete")))},dependencies:[k,E],encapsulation:2})}return c})();export{X as a};
@@ -1 +1 @@
1
- import{h as et,k as it}from"./chunk-ZHNSZ7X2.js";import{l as X}from"./chunk-ASBFWS7L.js";import{a as tt}from"./chunk-DJKI5XBW.js";import{T as K,e as ut,g as ct,ga as R,h as Q,la as Y,n as G,w as N}from"./chunk-U4V4ICSI.js";var nt=ut((J,Z)=>{(function(M,b){typeof J=="object"&&typeof Z<"u"?Z.exports=b():typeof define=="function"&&define.amd?define(b):(M=typeof globalThis<"u"?globalThis:M||self).dayjs=b()})(J,function(){"use strict";var M=1e3,b=6e4,o=36e5,d="millisecond",$="second",L="minute",O="hour",y="day",W="week",v="month",z="quarter",S="year",_="date",B="Invalid Date",rt=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,st=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,at={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(r){var i=["th","st","nd","rd"],t=r%100;return"["+r+(i[(t-20)%10]||i[t]||i[0])+"]"}},F=function(r,i,t){var n=String(r);return!n||n.length>=i?r:""+Array(i+1-n.length).join(t)+r},ot={s:F,z:function(r){var i=-r.utcOffset(),t=Math.abs(i),n=Math.floor(t/60),e=t%60;return(i<=0?"+":"-")+F(n,2,"0")+":"+F(e,2,"0")},m:function r(i,t){if(i.date()<t.date())return-r(t,i);var n=12*(t.year()-i.year())+(t.month()-i.month()),e=i.clone().add(n,v),s=t-e<0,a=i.clone().add(n+(s?-1:1),v);return+(-(n+(t-e)/(s?e-a:a-e))||0)},a:function(r){return r<0?Math.ceil(r)||0:Math.floor(r)},p:function(r){return{M:v,y:S,w:W,d:y,D:_,h:O,m:L,s:$,ms:d,Q:z}[r]||String(r||"").toLowerCase().replace(/s$/,"")},u:function(r){return r===void 0}},x="en",D={};D[x]=at;var E="$isDayjsObject",U=function(r){return r instanceof V||!(!r||!r[E])},I=function r(i,t,n){var e;if(!i)return x;if(typeof i=="string"){var s=i.toLowerCase();D[s]&&(e=s),t&&(D[s]=t,e=s);var a=i.split("-");if(!e&&a.length>1)return r(a[0])}else{var c=i.name;D[c]=i,e=c}return!n&&e&&(x=e),e||!n&&x},f=function(r,i){if(U(r))return r.clone();var t=typeof i=="object"?i:{};return t.date=r,t.args=arguments,new V(t)},u=ot;u.l=I,u.i=U,u.w=function(r,i){return f(r,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var V=function(){function r(t){this.$L=I(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[E]=!0}var i=r.prototype;return i.parse=function(t){this.$d=function(n){var e=n.date,s=n.utc;if(e===null)return new Date(NaN);if(u.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var a=e.match(rt);if(a){var c=a[2]-1||0,h=(a[7]||"0").substring(0,3);return s?new Date(Date.UTC(a[1],c,a[3]||1,a[4]||0,a[5]||0,a[6]||0,h)):new Date(a[1],c,a[3]||1,a[4]||0,a[5]||0,a[6]||0,h)}}return new Date(e)}(t),this.init()},i.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},i.$utils=function(){return u},i.isValid=function(){return this.$d.toString()!==B},i.isSame=function(t,n){var e=f(t);return this.startOf(n)<=e&&e<=this.endOf(n)},i.isAfter=function(t,n){return f(t)<this.startOf(n)},i.isBefore=function(t,n){return this.endOf(n)<f(t)},i.$g=function(t,n,e){return u.u(t)?this[n]:this.set(e,t)},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this.$d.getTime()},i.startOf=function(t,n){var e=this,s=!!u.u(n)||n,a=u.p(t),c=function(k,m){var w=u.w(e.$u?Date.UTC(e.$y,m,k):new Date(e.$y,m,k),e);return s?w:w.endOf(y)},h=function(k,m){return u.w(e.toDate()[k].apply(e.toDate("s"),(s?[0,0,0,0]:[23,59,59,999]).slice(m)),e)},l=this.$W,g=this.$M,p=this.$D,j="set"+(this.$u?"UTC":"");switch(a){case S:return s?c(1,0):c(31,11);case v:return s?c(1,g):c(0,g+1);case W:var T=this.$locale().weekStart||0,A=(l<T?l+7:l)-T;return c(s?p-A:p+(6-A),g);case y:case _:return h(j+"Hours",0);case O:return h(j+"Minutes",1);case L:return h(j+"Seconds",2);case $:return h(j+"Milliseconds",3);default:return this.clone()}},i.endOf=function(t){return this.startOf(t,!1)},i.$set=function(t,n){var e,s=u.p(t),a="set"+(this.$u?"UTC":""),c=(e={},e[y]=a+"Date",e[_]=a+"Date",e[v]=a+"Month",e[S]=a+"FullYear",e[O]=a+"Hours",e[L]=a+"Minutes",e[$]=a+"Seconds",e[d]=a+"Milliseconds",e)[s],h=s===y?this.$D+(n-this.$W):n;if(s===v||s===S){var l=this.clone().set(_,1);l.$d[c](h),l.init(),this.$d=l.set(_,Math.min(this.$D,l.daysInMonth())).$d}else c&&this.$d[c](h);return this.init(),this},i.set=function(t,n){return this.clone().$set(t,n)},i.get=function(t){return this[u.p(t)]()},i.add=function(t,n){var e,s=this;t=Number(t);var a=u.p(n),c=function(g){var p=f(s);return u.w(p.date(p.date()+Math.round(g*t)),s)};if(a===v)return this.set(v,this.$M+t);if(a===S)return this.set(S,this.$y+t);if(a===y)return c(1);if(a===W)return c(7);var h=(e={},e[L]=b,e[O]=o,e[$]=M,e)[a]||1,l=this.$d.getTime()+t*h;return u.w(l,this)},i.subtract=function(t,n){return this.add(-1*t,n)},i.format=function(t){var n=this,e=this.$locale();if(!this.isValid())return e.invalidDate||B;var s=t||"YYYY-MM-DDTHH:mm:ssZ",a=u.z(this),c=this.$H,h=this.$m,l=this.$M,g=e.weekdays,p=e.months,j=e.meridiem,T=function(m,w,H,C){return m&&(m[w]||m(n,s))||H[w].slice(0,C)},A=function(m){return u.s(c%12||12,m,"0")},k=j||function(m,w,H){var C=m<12?"AM":"PM";return H?C.toLowerCase():C};return s.replace(st,function(m,w){return w||function(H){switch(H){case"YY":return String(n.$y).slice(-2);case"YYYY":return u.s(n.$y,4,"0");case"M":return l+1;case"MM":return u.s(l+1,2,"0");case"MMM":return T(e.monthsShort,l,p,3);case"MMMM":return T(p,l);case"D":return n.$D;case"DD":return u.s(n.$D,2,"0");case"d":return String(n.$W);case"dd":return T(e.weekdaysMin,n.$W,g,2);case"ddd":return T(e.weekdaysShort,n.$W,g,3);case"dddd":return g[n.$W];case"H":return String(c);case"HH":return u.s(c,2,"0");case"h":return A(1);case"hh":return A(2);case"a":return k(c,h,!0);case"A":return k(c,h,!1);case"m":return String(h);case"mm":return u.s(h,2,"0");case"s":return String(n.$s);case"ss":return u.s(n.$s,2,"0");case"SSS":return u.s(n.$ms,3,"0");case"Z":return a}return null}(m)||a.replace(":","")})},i.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},i.diff=function(t,n,e){var s,a=this,c=u.p(n),h=f(t),l=(h.utcOffset()-this.utcOffset())*b,g=this-h,p=function(){return u.m(a,h)};switch(c){case S:s=p()/12;break;case v:s=p();break;case z:s=p()/3;break;case W:s=(g-l)/6048e5;break;case y:s=(g-l)/864e5;break;case O:s=g/o;break;case L:s=g/b;break;case $:s=g/M;break;default:s=g}return e?s:u.a(s)},i.daysInMonth=function(){return this.endOf(v).$D},i.$locale=function(){return D[this.$L]},i.locale=function(t,n){if(!t)return this.$L;var e=this.clone(),s=I(t,n,!0);return s&&(e.$L=s),e},i.clone=function(){return u.w(this.$d,this)},i.toDate=function(){return new Date(this.valueOf())},i.toJSON=function(){return this.isValid()?this.toISOString():null},i.toISOString=function(){return this.$d.toISOString()},i.toString=function(){return this.$d.toUTCString()},r}(),P=V.prototype;return f.prototype=P,[["$ms",d],["$s",$],["$m",L],["$H",O],["$W",y],["$M",v],["$y",S],["$D",_]].forEach(function(r){P[r[1]]=function(i){return this.$g(i,r[0],r[1])}}),f.extend=function(r,i){return r.$i||(r(i,V,f),r.$i=!0),f},f.locale=I,f.isDayjs=U,f.unix=function(r){return f(1e3*r)},f.en=D[x],f.Ls=D,f.p={},f})});var q=ct(nt(),1);var vt=(()=>{class M{$api=Y(it);$title=Y(X);$toastr=Y(et);$translate=Y(tt);env={};formAuth=!0;uiVersion;theme;lightingMode;currentLightingMode;actualLightingMode;browserLightingMode;menuMode;loginWallpaper;serverTimeOffset=0;defaultTheme="orange";themeList=["orange","red","pink","purple","deep-purple","indigo","blue","blue-grey","cyan","green","teal","grey","brown"];rtl=!1;settingsLoadedSubject=new G;onSettingsLoaded=this.settingsLoadedSubject.pipe(K());settingsLoaded=!1;constructor(){this.getAppSettings()}getAppSettings(){return Q(this,null,function*(){let o=yield N(this.$api.get("/auth/settings"));this.formAuth=o.formAuth,this.env=o.env,this.lightingMode=o.lightingMode,this.loginWallpaper=o.loginWallpaper,this.setLightingMode(this.lightingMode,"user"),this.setTheme(o.theme),this.setMenuMode(o.menuMode),this.setTitle(this.env.homebridgeInstanceName),this.checkServerTime(o.serverTimestamp),this.setUiVersion(o.env.packageVersion),this.setLang(this.env.lang),this.settingsLoaded=!0,this.settingsLoadedSubject.next(void 0)})}setBrowserLightingMode(o){this.browserLightingMode=o,this.lightingMode==="auto"&&this.setLightingMode(o,"browser")}setLightingMode(o,d){d==="user"&&(this.lightingMode=o),this.currentLightingMode=o,this.actualLightingMode=this.currentLightingMode==="auto"?this.browserLightingMode:this.currentLightingMode,this.theme&&this.setTheme(this.theme)}setTheme(o){(!o||!this.themeList.includes(o))&&(o=this.defaultTheme,N(this.$api.put("/config-editor/ui",{key:"theme",value:o})).catch($=>console.error($)));let d=window.document.querySelector("body");d.classList.remove(`config-ui-x-${this.theme}`),d.classList.remove(`config-ui-x-dark-mode-${this.theme}`),this.theme=o,this.actualLightingMode==="dark"?(d.classList.add(`config-ui-x-dark-mode-${this.theme}`),d.classList.contains("dark-mode")||d.classList.add("dark-mode")):(d.classList.add(`config-ui-x-${this.theme}`),d.classList.contains("dark-mode")&&d.classList.remove("dark-mode"))}setMenuMode(o){this.menuMode=o}setTitle(o){this.$title.setTitle(o||"Homebridge")}setUiVersion(o){this.uiVersion||(this.uiVersion=o)}setLang(o){o?this.$translate.use(o):o="auto",this.env.lang=o}setEnvItem(o,d){this.env[o]=d}checkServerTime(o){let $=(0,q.default)(o).diff((0,q.default)(),"hour");this.serverTimeOffset=$*60*60,($>=8||$<=-8)&&this.$toastr.warning(this.$translate.instant("settings.datetime.incorrect"),this.$translate.instant("toast.title_warning"),{timeOut:2e4,tapToDismiss:!1}).onTap.subscribe(()=>{window.open("https://homebridge.io/w/JqTFs","_blank")})}static \u0275fac=function(d){return new(d||M)};static \u0275prov=R({token:M,factory:M.\u0275fac,providedIn:"root"})}return M})();export{nt as a,vt as b};
1
+ import{h as et,k as it}from"./chunk-737XQ2KH.js";import{l as X}from"./chunk-ASBFWS7L.js";import{a as tt}from"./chunk-DJKI5XBW.js";import{T as K,e as ut,g as ct,ga as R,h as Q,la as Y,n as G,w as N}from"./chunk-U4V4ICSI.js";var nt=ut((J,Z)=>{(function(M,b){typeof J=="object"&&typeof Z<"u"?Z.exports=b():typeof define=="function"&&define.amd?define(b):(M=typeof globalThis<"u"?globalThis:M||self).dayjs=b()})(J,function(){"use strict";var M=1e3,b=6e4,o=36e5,d="millisecond",$="second",L="minute",O="hour",y="day",I="week",v="month",z="quarter",w="year",_="date",B="Invalid Date",rt=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,st=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,at={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(r){var i=["th","st","nd","rd"],t=r%100;return"["+r+(i[(t-20)%10]||i[t]||i[0])+"]"}},F=function(r,i,t){var n=String(r);return!n||n.length>=i?r:""+Array(i+1-n.length).join(t)+r},ot={s:F,z:function(r){var i=-r.utcOffset(),t=Math.abs(i),n=Math.floor(t/60),e=t%60;return(i<=0?"+":"-")+F(n,2,"0")+":"+F(e,2,"0")},m:function r(i,t){if(i.date()<t.date())return-r(t,i);var n=12*(t.year()-i.year())+(t.month()-i.month()),e=i.clone().add(n,v),s=t-e<0,a=i.clone().add(n+(s?-1:1),v);return+(-(n+(t-e)/(s?e-a:a-e))||0)},a:function(r){return r<0?Math.ceil(r)||0:Math.floor(r)},p:function(r){return{M:v,y:w,w:I,d:y,D:_,h:O,m:L,s:$,ms:d,Q:z}[r]||String(r||"").toLowerCase().replace(/s$/,"")},u:function(r){return r===void 0}},x="en",D={};D[x]=at;var E="$isDayjsObject",U=function(r){return r instanceof W||!(!r||!r[E])},V=function r(i,t,n){var e;if(!i)return x;if(typeof i=="string"){var s=i.toLowerCase();D[s]&&(e=s),t&&(D[s]=t,e=s);var a=i.split("-");if(!e&&a.length>1)return r(a[0])}else{var c=i.name;D[c]=i,e=c}return!n&&e&&(x=e),e||!n&&x},f=function(r,i){if(U(r))return r.clone();var t=typeof i=="object"?i:{};return t.date=r,t.args=arguments,new W(t)},u=ot;u.l=V,u.i=U,u.w=function(r,i){return f(r,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var W=function(){function r(t){this.$L=V(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[E]=!0}var i=r.prototype;return i.parse=function(t){this.$d=function(n){var e=n.date,s=n.utc;if(e===null)return new Date(NaN);if(u.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var a=e.match(rt);if(a){var c=a[2]-1||0,h=(a[7]||"0").substring(0,3);return s?new Date(Date.UTC(a[1],c,a[3]||1,a[4]||0,a[5]||0,a[6]||0,h)):new Date(a[1],c,a[3]||1,a[4]||0,a[5]||0,a[6]||0,h)}}return new Date(e)}(t),this.init()},i.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},i.$utils=function(){return u},i.isValid=function(){return this.$d.toString()!==B},i.isSame=function(t,n){var e=f(t);return this.startOf(n)<=e&&e<=this.endOf(n)},i.isAfter=function(t,n){return f(t)<this.startOf(n)},i.isBefore=function(t,n){return this.endOf(n)<f(t)},i.$g=function(t,n,e){return u.u(t)?this[n]:this.set(e,t)},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this.$d.getTime()},i.startOf=function(t,n){var e=this,s=!!u.u(n)||n,a=u.p(t),c=function(k,g){var S=u.w(e.$u?Date.UTC(e.$y,g,k):new Date(e.$y,g,k),e);return s?S:S.endOf(y)},h=function(k,g){return u.w(e.toDate()[k].apply(e.toDate("s"),(s?[0,0,0,0]:[23,59,59,999]).slice(g)),e)},l=this.$W,m=this.$M,p=this.$D,j="set"+(this.$u?"UTC":"");switch(a){case w:return s?c(1,0):c(31,11);case v:return s?c(1,m):c(0,m+1);case I:var T=this.$locale().weekStart||0,A=(l<T?l+7:l)-T;return c(s?p-A:p+(6-A),m);case y:case _:return h(j+"Hours",0);case O:return h(j+"Minutes",1);case L:return h(j+"Seconds",2);case $:return h(j+"Milliseconds",3);default:return this.clone()}},i.endOf=function(t){return this.startOf(t,!1)},i.$set=function(t,n){var e,s=u.p(t),a="set"+(this.$u?"UTC":""),c=(e={},e[y]=a+"Date",e[_]=a+"Date",e[v]=a+"Month",e[w]=a+"FullYear",e[O]=a+"Hours",e[L]=a+"Minutes",e[$]=a+"Seconds",e[d]=a+"Milliseconds",e)[s],h=s===y?this.$D+(n-this.$W):n;if(s===v||s===w){var l=this.clone().set(_,1);l.$d[c](h),l.init(),this.$d=l.set(_,Math.min(this.$D,l.daysInMonth())).$d}else c&&this.$d[c](h);return this.init(),this},i.set=function(t,n){return this.clone().$set(t,n)},i.get=function(t){return this[u.p(t)]()},i.add=function(t,n){var e,s=this;t=Number(t);var a=u.p(n),c=function(m){var p=f(s);return u.w(p.date(p.date()+Math.round(m*t)),s)};if(a===v)return this.set(v,this.$M+t);if(a===w)return this.set(w,this.$y+t);if(a===y)return c(1);if(a===I)return c(7);var h=(e={},e[L]=b,e[O]=o,e[$]=M,e)[a]||1,l=this.$d.getTime()+t*h;return u.w(l,this)},i.subtract=function(t,n){return this.add(-1*t,n)},i.format=function(t){var n=this,e=this.$locale();if(!this.isValid())return e.invalidDate||B;var s=t||"YYYY-MM-DDTHH:mm:ssZ",a=u.z(this),c=this.$H,h=this.$m,l=this.$M,m=e.weekdays,p=e.months,j=e.meridiem,T=function(g,S,H,C){return g&&(g[S]||g(n,s))||H[S].slice(0,C)},A=function(g){return u.s(c%12||12,g,"0")},k=j||function(g,S,H){var C=g<12?"AM":"PM";return H?C.toLowerCase():C};return s.replace(st,function(g,S){return S||function(H){switch(H){case"YY":return String(n.$y).slice(-2);case"YYYY":return u.s(n.$y,4,"0");case"M":return l+1;case"MM":return u.s(l+1,2,"0");case"MMM":return T(e.monthsShort,l,p,3);case"MMMM":return T(p,l);case"D":return n.$D;case"DD":return u.s(n.$D,2,"0");case"d":return String(n.$W);case"dd":return T(e.weekdaysMin,n.$W,m,2);case"ddd":return T(e.weekdaysShort,n.$W,m,3);case"dddd":return m[n.$W];case"H":return String(c);case"HH":return u.s(c,2,"0");case"h":return A(1);case"hh":return A(2);case"a":return k(c,h,!0);case"A":return k(c,h,!1);case"m":return String(h);case"mm":return u.s(h,2,"0");case"s":return String(n.$s);case"ss":return u.s(n.$s,2,"0");case"SSS":return u.s(n.$ms,3,"0");case"Z":return a}return null}(g)||a.replace(":","")})},i.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},i.diff=function(t,n,e){var s,a=this,c=u.p(n),h=f(t),l=(h.utcOffset()-this.utcOffset())*b,m=this-h,p=function(){return u.m(a,h)};switch(c){case w:s=p()/12;break;case v:s=p();break;case z:s=p()/3;break;case I:s=(m-l)/6048e5;break;case y:s=(m-l)/864e5;break;case O:s=m/o;break;case L:s=m/b;break;case $:s=m/M;break;default:s=m}return e?s:u.a(s)},i.daysInMonth=function(){return this.endOf(v).$D},i.$locale=function(){return D[this.$L]},i.locale=function(t,n){if(!t)return this.$L;var e=this.clone(),s=V(t,n,!0);return s&&(e.$L=s),e},i.clone=function(){return u.w(this.$d,this)},i.toDate=function(){return new Date(this.valueOf())},i.toJSON=function(){return this.isValid()?this.toISOString():null},i.toISOString=function(){return this.$d.toISOString()},i.toString=function(){return this.$d.toUTCString()},r}(),P=W.prototype;return f.prototype=P,[["$ms",d],["$s",$],["$m",L],["$H",O],["$W",y],["$M",v],["$y",w],["$D",_]].forEach(function(r){P[r[1]]=function(i){return this.$g(i,r[0],r[1])}}),f.extend=function(r,i){return r.$i||(r(i,W,f),r.$i=!0),f},f.locale=V,f.isDayjs=U,f.unix=function(r){return f(1e3*r)},f.en=D[x],f.Ls=D,f.p={},f})});var q=ct(nt(),1);var vt=(()=>{class M{$api=Y(it);$title=Y(X);$toastr=Y(et);$translate=Y(tt);env={};formAuth=!0;uiVersion;theme;lightingMode;currentLightingMode;actualLightingMode;browserLightingMode;menuMode;wallpaper;serverTimeOffset=0;defaultTheme="orange";themeList=["orange","red","pink","purple","deep-purple","indigo","blue","blue-grey","cyan","green","teal","grey","brown"];rtl=!1;settingsLoadedSubject=new G;onSettingsLoaded=this.settingsLoadedSubject.pipe(K());settingsLoaded=!1;constructor(){this.getAppSettings()}getAppSettings(){return Q(this,null,function*(){let o=yield N(this.$api.get("/auth/settings"));this.formAuth=o.formAuth,this.env=o.env,this.lightingMode=o.lightingMode,this.wallpaper=o.wallpaper,this.setLightingMode(this.lightingMode,"user"),this.setTheme(o.theme),this.setMenuMode(o.menuMode),this.setTitle(this.env.homebridgeInstanceName),this.checkServerTime(o.serverTimestamp),this.setUiVersion(o.env.packageVersion),this.setLang(this.env.lang),this.settingsLoaded=!0,this.settingsLoadedSubject.next(void 0)})}setBrowserLightingMode(o){this.browserLightingMode=o,this.lightingMode==="auto"&&this.setLightingMode(o,"browser")}setLightingMode(o,d){d==="user"&&(this.lightingMode=o),this.currentLightingMode=o,this.actualLightingMode=this.currentLightingMode==="auto"?this.browserLightingMode:this.currentLightingMode,this.theme&&this.setTheme(this.theme)}setTheme(o){(!o||!this.themeList.includes(o))&&(o=this.defaultTheme,N(this.$api.put("/config-editor/ui",{key:"theme",value:o})).catch($=>console.error($)));let d=window.document.querySelector("body");d.classList.remove(`config-ui-x-${this.theme}`),d.classList.remove(`config-ui-x-dark-mode-${this.theme}`),this.theme=o,this.actualLightingMode==="dark"?(d.classList.add(`config-ui-x-dark-mode-${this.theme}`),d.classList.contains("dark-mode")||d.classList.add("dark-mode")):(d.classList.add(`config-ui-x-${this.theme}`),d.classList.contains("dark-mode")&&d.classList.remove("dark-mode"))}setMenuMode(o){this.menuMode=o}setTitle(o){this.$title.setTitle(o||"Homebridge")}setUiVersion(o){this.uiVersion||(this.uiVersion=o)}setLang(o){o?this.$translate.use(o):o="auto",this.env.lang=o}setEnvItem(o,d){this.env[o]=d}checkServerTime(o){let $=(0,q.default)(o).diff((0,q.default)(),"hour");this.serverTimeOffset=$*60*60,($>=8||$<=-8)&&this.$toastr.warning(this.$translate.instant("settings.datetime.incorrect"),this.$translate.instant("toast.title_warning"),{timeOut:2e4,tapToDismiss:!1}).onTap.subscribe(()=>{window.open("https://homebridge.io/w/JqTFs","_blank")})}static \u0275fac=function(d){return new(d||M)};static \u0275prov=R({token:M,factory:M.\u0275fac,providedIn:"root"})}return M})();export{nt as a,vt as b};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-I4MV25YT.js";import"./chunk-3IDLL4EL.js";import"./chunk-JMCN2SQV.js";import"./chunk-YXEV6KOV.js";import"./chunk-7S2SCSTB.js";import"./chunk-HLSZVFAU.js";import"./chunk-DW3UVCVP.js";import"./chunk-QR7L4UUP.js";import"./chunk-5GPU7OWP.js";import"./chunk-3ZZZY5X3.js";import"./chunk-737XQ2KH.js";import"./chunk-ASBFWS7L.js";import"./chunk-DJKI5XBW.js";import"./chunk-U4V4ICSI.js";export{a as SetupWizardComponent};
@@ -0,0 +1 @@
1
+ import{b as a}from"./chunk-TT6Q7AVH.js";import"./chunk-3SXGHQEL.js";import"./chunk-WU5ATTVG.js";import"./chunk-XZR7OZ6I.js";import"./chunk-7S2SCSTB.js";import"./chunk-HLSZVFAU.js";import"./chunk-DW3UVCVP.js";import"./chunk-QR7L4UUP.js";import"./chunk-5GPU7OWP.js";import"./chunk-3ZZZY5X3.js";import"./chunk-737XQ2KH.js";import"./chunk-ASBFWS7L.js";import"./chunk-DJKI5XBW.js";import"./chunk-U4V4ICSI.js";export{a as AccessoriesComponent};
@@ -1 +1 @@
1
- import{d as n}from"./chunk-QR7L4UUP.js";import{b as s}from"./chunk-G43HU5Q5.js";import{ga as o,h as r,la as e,w as i}from"./chunk-U4V4ICSI.js";var l=(()=>{class t{$router=e(n);$settings=e(s);constructor(){}canActivate(){return r(this,null,function*(){return this.$settings.settingsLoaded||(yield i(this.$settings.onSettingsLoaded)),this.$settings.env.setupWizardComplete===!1||this.$router.navigate(["/"]),!0})}static \u0275fac=function(a){return new(a||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{l as a};
1
+ import{d as n}from"./chunk-QR7L4UUP.js";import{b as s}from"./chunk-3ZZZY5X3.js";import{ga as o,h as r,la as e,w as i}from"./chunk-U4V4ICSI.js";var l=(()=>{class t{$router=e(n);$settings=e(s);constructor(){}canActivate(){return r(this,null,function*(){return this.$settings.settingsLoaded||(yield i(this.$settings.onSettingsLoaded)),this.$settings.env.setupWizardComplete===!1||this.$router.navigate(["/"]),!0})}static \u0275fac=function(a){return new(a||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{l as a};
@@ -1 +1 @@
1
- import{a as _,b as D}from"./chunk-G43HU5Q5.js";import{j as c,k as S}from"./chunk-ZHNSZ7X2.js";import{f as x}from"./chunk-ASBFWS7L.js";import{C as v,g as O,ga as h,h as a,ha as E,ja as y,ka as l,la as f,mb as I,r as p,va as j,w as d,x as T,z as w}from"./chunk-U4V4ICSI.js";var g=new y("JWT_OPTIONS"),m=(()=>{class r{constructor(e=null){this.tokenGetter=e&&e.tokenGetter||function(){}}urlBase64Decode(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:{t+="==";break}case 3:{t+="=";break}default:throw new Error("Illegal base64url string!")}return this.b64DecodeUnicode(t)}b64decode(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o="";if(e=String(e).replace(/=+$/,""),e.length%4===1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(let i=0,s,n,b=0;n=e.charAt(b++);~n&&(s=i%4?s*64+n:n,i++%4)?o+=String.fromCharCode(255&s>>(-2*i&6)):0)n=t.indexOf(n);return o}b64DecodeUnicode(e){return decodeURIComponent(Array.prototype.map.call(this.b64decode(e),t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)).join(""))}decodeToken(e=this.tokenGetter()){return e instanceof Promise?e.then(t=>this._decodeToken(t)):this._decodeToken(e)}_decodeToken(e){if(!e||e==="")return null;let t=e.split(".");if(t.length!==3)throw new Error("The inspected token doesn't appear to be a JWT. Check to make sure it has three parts and see https://jwt.io for more.");let o=this.urlBase64Decode(t[1]);if(!o)throw new Error("Cannot decode the token.");return JSON.parse(o)}getTokenExpirationDate(e=this.tokenGetter()){return e instanceof Promise?e.then(t=>this._getTokenExpirationDate(t)):this._getTokenExpirationDate(e)}_getTokenExpirationDate(e){let t;if(t=this.decodeToken(e),!t||!t.hasOwnProperty("exp"))return null;let o=new Date(0);return o.setUTCSeconds(t.exp),o}isTokenExpired(e=this.tokenGetter(),t){return e instanceof Promise?e.then(o=>this._isTokenExpired(o,t)):this._isTokenExpired(e,t)}_isTokenExpired(e,t){if(!e||e==="")return!0;let o=this.getTokenExpirationDate(e);return t=t||0,o===null?!1:!(o.valueOf()>new Date().valueOf()+t*1e3)}getAuthScheme(e,t){return typeof e=="function"?e(t):e}}return r.\u0275fac=function(e){return new(e||r)(l(g))},r.\u0275prov=h({token:r,factory:r.\u0275fac}),r})(),$=r=>r instanceof Promise?v(()=>r):p(r),R=(()=>{class r{constructor(e,t,o){this.jwtHelper=t,this.document=o,this.standardPorts=["80","443"],this.tokenGetter=e.tokenGetter,this.headerName=e.headerName||"Authorization",this.authScheme=e.authScheme||e.authScheme===""?e.authScheme:"Bearer ",this.allowedDomains=e.allowedDomains||[],this.disallowedRoutes=e.disallowedRoutes||[],this.throwNoTokenError=e.throwNoTokenError||!1,this.skipWhenExpired=e.skipWhenExpired}isAllowedDomain(e){let t=new URL(e.url,this.document.location.origin);if(t.host===this.document.location.host)return!0;let o=`${t.hostname}${t.port&&!this.standardPorts.includes(t.port)?":"+t.port:""}`;return this.allowedDomains.findIndex(i=>typeof i=="string"?i===o:i instanceof RegExp?i.test(o):!1)>-1}isDisallowedRoute(e){let t=new URL(e.url,this.document.location.origin);return this.disallowedRoutes.findIndex(o=>{if(typeof o=="string"){let i=new URL(o,this.document.location.origin);return i.hostname===t.hostname&&i.pathname===t.pathname}return o instanceof RegExp?o.test(e.url):!1})>-1}handleInterception(e,t,o){let i=this.jwtHelper.getAuthScheme(this.authScheme,t);if(!e&&this.throwNoTokenError)throw new Error("Could not get token from tokenGetter function.");let s=p(!1);return this.skipWhenExpired&&(s=e?$(this.jwtHelper.isTokenExpired(e)):p(!0)),e?s.pipe(T(n=>n&&this.skipWhenExpired?t.clone():t.clone({setHeaders:{[this.headerName]:`${i}${e}`}})),w(n=>o.handle(n))):o.handle(t)}intercept(e,t){if(!this.isAllowedDomain(e)||this.isDisallowedRoute(e))return t.handle(e);let o=this.tokenGetter(e);return $(o).pipe(w(i=>this.handleInterception(i,e,t)))}}return r.\u0275fac=function(e){return new(e||r)(l(g),l(m),l(j))},r.\u0275prov=h({token:r,factory:r.\u0275fac}),r})(),F=(()=>{class r{constructor(e){if(e)throw new Error("JwtModule is already loaded. It should only be imported in your application's main module.")}static forRoot(e){return{ngModule:r,providers:[{provide:x,useClass:R,multi:!0},e.jwtOptionsProvider||{provide:g,useValue:e.config},m]}}}return r.\u0275fac=function(e){return new(e||r)(l(r,12))},r.\u0275mod=I({type:r}),r.\u0275inj=E({}),r})();var k=O(_(),1);var q=(()=>{class r{$api=f(S);$jwtHelper=f(m);$settings=f(D);token;user={};logoutTimer;constructor(){this.loadToken()}login(e){return a(this,null,function*(){let t=yield d(this.$api.post("/auth/login",e));if(!this.validateToken(t.access_token))throw new Error("Invalid username or password.");window.localStorage.setItem(c.jwt.tokenKey,t.access_token),yield this.$settings.getAppSettings()})}noauth(){return a(this,null,function*(){let e=yield d(this.$api.post("/auth/noauth",{}));if(this.validateToken(e.access_token))window.localStorage.setItem(c.jwt.tokenKey,e.access_token),yield this.$settings.getAppSettings();else throw new Error("Invalid username or password.")})}logout(){this.user=null,this.token=null,window.localStorage.removeItem(c.jwt.tokenKey),window.location.reload()}loadToken(){return a(this,null,function*(){this.$settings.settingsLoaded||(yield d(this.$settings.onSettingsLoaded));let e=window.localStorage.getItem(c.jwt.tokenKey);e&&this.validateToken(e)})}validateToken(e){try{return this.$jwtHelper.isTokenExpired(e,this.$settings.serverTimeOffset)&&this.logout(),this.user=this.$jwtHelper.decodeToken(e),this.token=e,this.setLogoutTimer(),!0}catch{return window.localStorage.removeItem(c.jwt.tokenKey),this.token=null,!1}}checkToken(){return a(this,null,function*(){try{return yield d(this.$api.get("/auth/check"))}catch(e){e.status===401&&(console.error("Current token is not valid"),this.logout())}})}setLogoutTimer(){if(clearTimeout(this.logoutTimer),!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)){let t=(0,k.default)(this.$jwtHelper.getTokenExpirationDate(this.token)).diff((0,k.default)().add(this.$settings.serverTimeOffset,"s"),"millisecond");t<=2147483647&&(this.logoutTimer=setTimeout(()=>a(this,null,function*(){this.$settings.formAuth===!1?(yield this.noauth(),window.location.reload()):this.logout()}),t))}}isLoggedIn(){return this.$settings.env.instanceId!==this.user.instanceId?(console.error("Token does not match instance"),!1):this.user&&this.token&&!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac})}return r})();export{m as a,F as b,q as c};
1
+ import{a as _,b as D}from"./chunk-3ZZZY5X3.js";import{j as c,k as S}from"./chunk-737XQ2KH.js";import{f as x}from"./chunk-ASBFWS7L.js";import{C as v,g as O,ga as h,h as a,ha as E,ja as y,ka as l,la as f,mb as I,r as p,va as j,w as d,x as T,z as w}from"./chunk-U4V4ICSI.js";var g=new y("JWT_OPTIONS"),m=(()=>{class r{constructor(e=null){this.tokenGetter=e&&e.tokenGetter||function(){}}urlBase64Decode(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:{t+="==";break}case 3:{t+="=";break}default:throw new Error("Illegal base64url string!")}return this.b64DecodeUnicode(t)}b64decode(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o="";if(e=String(e).replace(/=+$/,""),e.length%4===1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(let i=0,s,n,b=0;n=e.charAt(b++);~n&&(s=i%4?s*64+n:n,i++%4)?o+=String.fromCharCode(255&s>>(-2*i&6)):0)n=t.indexOf(n);return o}b64DecodeUnicode(e){return decodeURIComponent(Array.prototype.map.call(this.b64decode(e),t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)).join(""))}decodeToken(e=this.tokenGetter()){return e instanceof Promise?e.then(t=>this._decodeToken(t)):this._decodeToken(e)}_decodeToken(e){if(!e||e==="")return null;let t=e.split(".");if(t.length!==3)throw new Error("The inspected token doesn't appear to be a JWT. Check to make sure it has three parts and see https://jwt.io for more.");let o=this.urlBase64Decode(t[1]);if(!o)throw new Error("Cannot decode the token.");return JSON.parse(o)}getTokenExpirationDate(e=this.tokenGetter()){return e instanceof Promise?e.then(t=>this._getTokenExpirationDate(t)):this._getTokenExpirationDate(e)}_getTokenExpirationDate(e){let t;if(t=this.decodeToken(e),!t||!t.hasOwnProperty("exp"))return null;let o=new Date(0);return o.setUTCSeconds(t.exp),o}isTokenExpired(e=this.tokenGetter(),t){return e instanceof Promise?e.then(o=>this._isTokenExpired(o,t)):this._isTokenExpired(e,t)}_isTokenExpired(e,t){if(!e||e==="")return!0;let o=this.getTokenExpirationDate(e);return t=t||0,o===null?!1:!(o.valueOf()>new Date().valueOf()+t*1e3)}getAuthScheme(e,t){return typeof e=="function"?e(t):e}}return r.\u0275fac=function(e){return new(e||r)(l(g))},r.\u0275prov=h({token:r,factory:r.\u0275fac}),r})(),$=r=>r instanceof Promise?v(()=>r):p(r),R=(()=>{class r{constructor(e,t,o){this.jwtHelper=t,this.document=o,this.standardPorts=["80","443"],this.tokenGetter=e.tokenGetter,this.headerName=e.headerName||"Authorization",this.authScheme=e.authScheme||e.authScheme===""?e.authScheme:"Bearer ",this.allowedDomains=e.allowedDomains||[],this.disallowedRoutes=e.disallowedRoutes||[],this.throwNoTokenError=e.throwNoTokenError||!1,this.skipWhenExpired=e.skipWhenExpired}isAllowedDomain(e){let t=new URL(e.url,this.document.location.origin);if(t.host===this.document.location.host)return!0;let o=`${t.hostname}${t.port&&!this.standardPorts.includes(t.port)?":"+t.port:""}`;return this.allowedDomains.findIndex(i=>typeof i=="string"?i===o:i instanceof RegExp?i.test(o):!1)>-1}isDisallowedRoute(e){let t=new URL(e.url,this.document.location.origin);return this.disallowedRoutes.findIndex(o=>{if(typeof o=="string"){let i=new URL(o,this.document.location.origin);return i.hostname===t.hostname&&i.pathname===t.pathname}return o instanceof RegExp?o.test(e.url):!1})>-1}handleInterception(e,t,o){let i=this.jwtHelper.getAuthScheme(this.authScheme,t);if(!e&&this.throwNoTokenError)throw new Error("Could not get token from tokenGetter function.");let s=p(!1);return this.skipWhenExpired&&(s=e?$(this.jwtHelper.isTokenExpired(e)):p(!0)),e?s.pipe(T(n=>n&&this.skipWhenExpired?t.clone():t.clone({setHeaders:{[this.headerName]:`${i}${e}`}})),w(n=>o.handle(n))):o.handle(t)}intercept(e,t){if(!this.isAllowedDomain(e)||this.isDisallowedRoute(e))return t.handle(e);let o=this.tokenGetter(e);return $(o).pipe(w(i=>this.handleInterception(i,e,t)))}}return r.\u0275fac=function(e){return new(e||r)(l(g),l(m),l(j))},r.\u0275prov=h({token:r,factory:r.\u0275fac}),r})(),F=(()=>{class r{constructor(e){if(e)throw new Error("JwtModule is already loaded. It should only be imported in your application's main module.")}static forRoot(e){return{ngModule:r,providers:[{provide:x,useClass:R,multi:!0},e.jwtOptionsProvider||{provide:g,useValue:e.config},m]}}}return r.\u0275fac=function(e){return new(e||r)(l(r,12))},r.\u0275mod=I({type:r}),r.\u0275inj=E({}),r})();var k=O(_(),1);var q=(()=>{class r{$api=f(S);$jwtHelper=f(m);$settings=f(D);token;user={};logoutTimer;constructor(){this.loadToken()}login(e){return a(this,null,function*(){let t=yield d(this.$api.post("/auth/login",e));if(!this.validateToken(t.access_token))throw new Error("Invalid username or password.");window.localStorage.setItem(c.jwt.tokenKey,t.access_token),yield this.$settings.getAppSettings()})}noauth(){return a(this,null,function*(){let e=yield d(this.$api.post("/auth/noauth",{}));if(this.validateToken(e.access_token))window.localStorage.setItem(c.jwt.tokenKey,e.access_token),yield this.$settings.getAppSettings();else throw new Error("Invalid username or password.")})}logout(){this.user=null,this.token=null,window.localStorage.removeItem(c.jwt.tokenKey),window.location.reload()}loadToken(){return a(this,null,function*(){this.$settings.settingsLoaded||(yield d(this.$settings.onSettingsLoaded));let e=window.localStorage.getItem(c.jwt.tokenKey);e&&this.validateToken(e)})}validateToken(e){try{return this.$jwtHelper.isTokenExpired(e,this.$settings.serverTimeOffset)&&this.logout(),this.user=this.$jwtHelper.decodeToken(e),this.token=e,this.setLogoutTimer(),!0}catch{return window.localStorage.removeItem(c.jwt.tokenKey),this.token=null,!1}}checkToken(){return a(this,null,function*(){try{return yield d(this.$api.get("/auth/check"))}catch(e){e.status===401&&(console.error("Current token is not valid"),this.logout())}})}setLogoutTimer(){if(clearTimeout(this.logoutTimer),!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)){let t=(0,k.default)(this.$jwtHelper.getTokenExpirationDate(this.token)).diff((0,k.default)().add(this.$settings.serverTimeOffset,"s"),"millisecond");t<=2147483647&&(this.logoutTimer=setTimeout(()=>a(this,null,function*(){this.$settings.formAuth===!1?(yield this.noauth(),window.location.reload()):this.logout()}),t))}}isLoggedIn(){return this.$settings.env.instanceId!==this.user.instanceId?(console.error("Token does not match instance"),!1):this.user&&this.token&&!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac})}return r})();export{m as a,F as b,q as c};
@@ -1 +1 @@
1
- import"./chunk-J4USS3TJ.js";import"./chunk-TCJEY6SZ.js";import"./chunk-Q7VA22QV.js";import"./chunk-YXEV6KOV.js";import"./chunk-XH4RYJ6Y.js";import{g as i}from"./chunk-QR7L4UUP.js";import"./chunk-5BL6PCNR.js";import"./chunk-G43HU5Q5.js";import"./chunk-ZHNSZ7X2.js";import"./chunk-ASBFWS7L.js";import{c as m}from"./chunk-DJKI5XBW.js";import{ha as t,kd as n,mb as r}from"./chunk-U4V4ICSI.js";var u=[{path:"",loadComponent:()=>import("./chunk-IZSJEHPY.js").then(o=>o.TerminalComponent)}],a=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[i.forChild(u),i]})}return o})();var T=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[n,a,m.forChild()]})}return o})();export{T as TerminalModule};
1
+ import"./chunk-3JLPI3KL.js";import"./chunk-HP7RQRMI.js";import"./chunk-Q7VA22QV.js";import"./chunk-YXEV6KOV.js";import"./chunk-DW3UVCVP.js";import{g as i}from"./chunk-QR7L4UUP.js";import"./chunk-5GPU7OWP.js";import"./chunk-3ZZZY5X3.js";import"./chunk-737XQ2KH.js";import"./chunk-ASBFWS7L.js";import{c as m}from"./chunk-DJKI5XBW.js";import{ha as t,kd as n,mb as r}from"./chunk-U4V4ICSI.js";var u=[{path:"",loadComponent:()=>import("./chunk-VQGJUQIC.js").then(o=>o.TerminalComponent)}],a=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[i.forChild(u),i]})}return o})();var T=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[n,a,m.forChild()]})}return o})();export{T as TerminalModule};
@@ -1 +1 @@
1
- import{e as ft,m as gt}from"./chunk-ASBFWS7L.js";import{$a as r,Fb as M,Gb as E,Nb as l,Ob as h,Pb as p,Qb as F,Rb as Y,Sb as K,Ub as Q,Wa as ht,Wb as mt,Xa as q,Xb as j,Yb as c,a as u,b as T,cb as dt,dd as J,e as xt,fb as y,ga as C,gc as A,ha as lt,ic as m,ja as ct,jc as f,ka as w,la as _,lb as G,lc as b,ma as ut,mb as pt,n as g,ra as V,rb as S,sa as z,ua as N,ub as U,va as Z,za as O}from"./chunk-U4V4ICSI.js";var Tt=xt((De,Ut)=>{Ut.exports={name:"homebridge-config-ui-x",displayName:"Homebridge UI",version:"5.0.0-beta.76",description:"A web based management, configuration and control platform for Homebridge.",author:"oznu <dev@oz.nu>",license:"MIT",funding:[{type:"github",url:"https://github.com/sponsors/oznu"},{type:"paypal",url:"https://paypal.me/oznu"}],repository:{type:"git",url:"git+https://github.com/homebridge/homebridge-config-ui-x.git"},bugs:{url:"https://github.com/homebridge/homebridge-config-ui-x/issues"},keywords:["homebridge-plugin","ui","gui","web","homebridge","homebridge-config-ui-x","ui-x","config-ui-x","homebridge-x","homebridge server","homebridge ui","homebridge-ui","homebridge gui","homebridge-gui","web interface","config ui","management","config editor","linux","macOS","osx","windows","raspberry pi","accessory control","smart home","hb-service"],main:"./dist/index.js",bin:{"homebridge-config-ui-x":"dist/bin/standalone.js","hb-service":"dist/bin/hb-service.js"},engines:{node:"^20 || ^22",homebridge:"^1.8.0 || ^2.0.0-beta.0"},scripts:{build:"npm run build:server && npm run build:ui","build:server":"rimraf dist && tsc -p tsconfig.build.json","build:ui":"npm run build --prefix ui",check:"npm run check:server && npm run check:ui","check:server":"npm install && npm outdated","check:ui":"npm install --prefix ui && npm outdated --prefix ui","lang-sync":"ts-node scripts/lang-sync.ts",lint:"eslint . --max-warnings=0","lint:fix":"npm run lint -- --fix",prepublishOnly:"npm i --package-lock-only && npm run lint && npm run build",start:"ts-node -r tsconfig-paths/register src/main.ts",test:"vitest run","test-coverage":"npm run test -- --coverage","upgrade-install":"./scripts/upgrade-install.sh",watch:'concurrently "npm run watch:ui" "npm run watch:server"',"watch:server":"nodemon","watch:ui":"npm run start --prefix ui"},dependencies:{"@fastify/helmet":"13.0.1","@fastify/multipart":"9.0.3","@fastify/static":"8.2.0","@homebridge/hap-client":"2.2.0","@homebridge/node-pty-prebuilt-multiarch":"0.12.0","@nestjs/axios":"4.0.0","@nestjs/common":"11.1.2","@nestjs/core":"11.1.2","@nestjs/jwt":"11.0.0","@nestjs/passport":"11.0.5","@nestjs/platform-fastify":"11.1.2","@nestjs/platform-socket.io":"11.1.2","@nestjs/swagger":"11.2.0","@nestjs/websockets":"11.1.2",axios:"1.9.0","bash-color":"0.0.4","class-transformer":"0.5.1","class-validator":"0.14.2",commander:"14.0.0",dayjs:"1.11.13",fastify:"5.3.3","fs-extra":"11.3.0",jsonwebtoken:"9.0.2",lodash:"4.17.21","node-cache":"5.1.2","node-schedule":"2.1.1",ora:"5.4.1",otplib:"12.0.1","p-limit":"3.1.0",passport:"0.7.0","passport-jwt":"4.0.1","reflect-metadata":"0.2.2",rxjs:"7.8.2",semver:"7.7.2",systeminformation:"5.27.1",tail:"2.2.6",tar:"7.4.3","tcp-port-used":"1.0.2",unzipper:"0.12.3"},devDependencies:{"@antfu/eslint-config":"^4.13.2","@nestjs/testing":"^11.1.1","@prettier/plugin-xml":"^3.4.1","@types/fs-extra":"^11.0.4","@types/lodash":"^4.17.17","@types/node":"^22.15.29","@types/node-schedule":"^2.1.7","@types/passport-jwt":"^4.0.1","@types/semver":"^7.7.0","@types/tail":"^2.2.3","@types/tcp-port-used":"^1.0.4","@types/unzipper":"^0.10.11","@vitest/coverage-v8":"^3.2.0",concurrently:"^9.1.2","eslint-plugin-format":"^1.0.1","form-data":"^4.0.2",nodemon:"^3.1.10",rimraf:"^6.0.1","ts-loader":"^9.5.2","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0",typescript:"^5.8.3","unplugin-swc":"^1.5.4",vitest:"^3.2.0"},maintainers:[{email:"bwp91@icloud.com",name:"bwp91"},{email:"dev@oz.nu",name:"oznu"},{email:"northern.man1@gmail.com",name:"northernman"},{email:"mail@anderl-bauer.de",name:"supereg"},{email:"khaos.tian@gmail.com",name:"khaost"},{email:"erik.baauw@xs4all.nl",name:"ebaauw"},{email:"donavan.becker@icloud.com",name:"donavanbecker"},{email:"dustin.greif@gmail.com",name:"dustin.greif"},{email:"nfarina@gmail.com",name:"nfarina"}],scarfSettings:{enabled:!1}}});var v=function(i){return i[i.State=0]="State",i[i.Transition=1]="Transition",i[i.Sequence=2]="Sequence",i[i.Group=3]="Group",i[i.Animate=4]="Animate",i[i.Keyframes=5]="Keyframes",i[i.Style=6]="Style",i[i.Trigger=7]="Trigger",i[i.Reference=8]="Reference",i[i.AnimateChild=9]="AnimateChild",i[i.AnimateRef=10]="AnimateRef",i[i.Query=11]="Query",i[i.Stagger=12]="Stagger",i}(v||{}),It="*";function tt(i,s){return{type:v.Trigger,name:i,definitions:s,options:{}}}function P(i,s=null){return{type:v.Animate,styles:s,timings:i}}function Yt(i,s=null){return{type:v.Sequence,steps:i,options:s}}function R(i){return{type:v.Style,styles:i,offset:null}}function H(i,s,t){return{type:v.State,name:i,styles:s,options:t}}function B(i,s,t=null){return{type:v.Transition,expr:i,animation:s,options:t}}var W=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(s=0,t=0){this.totalTime=s+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(s=>s()),this._onDoneFns=[])}onStart(s){this._originalOnStartFns.push(s),this._onStartFns.push(s)}onDone(s){this._originalOnDoneFns.push(s),this._onDoneFns.push(s)}onDestroy(s){this._onDestroyFns.push(s)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(s=>s()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(s=>s()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(s){this._position=this.totalTime?s*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(s){let t=s=="start"?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}},X=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(s){this.players=s;let t=0,e=0,n=0,o=this.players.length;o==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(a=>{a.onDone(()=>{++t==o&&this._onFinish()}),a.onDestroy(()=>{++e==o&&this._onDestroy()}),a.onStart(()=>{++n==o&&this._onStart()})}),this.totalTime=this.players.reduce((a,d)=>Math.max(a,d.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(s=>s()),this._onDoneFns=[])}init(){this.players.forEach(s=>s.init())}onStart(s){this._onStartFns.push(s)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(s=>s()),this._onStartFns=[])}onDone(s){this._onDoneFns.push(s)}onDestroy(s){this._onDestroyFns.push(s)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(s=>s.play())}pause(){this.players.forEach(s=>s.pause())}restart(){this.players.forEach(s=>s.restart())}finish(){this._onFinish(),this.players.forEach(s=>s.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(s=>s.destroy()),this._onDestroyFns.forEach(s=>s()),this._onDestroyFns=[])}reset(){this.players.forEach(s=>s.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(s){let t=s*this.totalTime;this.players.forEach(e=>{let n=e.totalTime?Math.min(1,t/e.totalTime):1;e.setPosition(n)})}getPosition(){let s=this.players.reduce((t,e)=>t===null||e.totalTime>t.totalTime?e:t,null);return s!=null?s.getPosition():0}beforeDestroy(){this.players.forEach(s=>{s.beforeDestroy&&s.beforeDestroy()})}triggerCallback(s){let t=s=="start"?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}},Ot="!";var _t=["toast-component",""];function Et(i,s){if(i&1){let t=Q();h(0,"button",5),j("click",function(){V(t);let n=c();return z(n.remove())}),h(1,"span",6),f(2,"\xD7"),p()()}}function Ft(i,s){if(i&1&&(Y(0),f(1),K()),i&2){let t=c(2);r(),b("[",t.duplicatesCount+1,"]")}}function jt(i,s){if(i&1&&(h(0,"div"),f(1),S(2,Ft,2,1,"ng-container",4),p()),i&2){let t=c();m(t.options.titleClass),E("aria-label",t.title),r(),b(" ",t.title," "),r(),l("ngIf",t.duplicatesCount)}}function At(i,s){if(i&1&&F(0,"div",7),i&2){let t=c();m(t.options.messageClass),l("innerHTML",t.message,q)}}function Rt(i,s){if(i&1&&(h(0,"div",8),f(1),p()),i&2){let t=c();m(t.options.messageClass),E("aria-label",t.message),r(),b(" ",t.message," ")}}function Ht(i,s){if(i&1&&(h(0,"div"),F(1,"div",9),p()),i&2){let t=c();r(),A("width",t.width()+"%")}}function kt(i,s){if(i&1){let t=Q();h(0,"button",5),j("click",function(){V(t);let n=c();return z(n.remove())}),h(1,"span",6),f(2,"\xD7"),p()()}}function Nt(i,s){if(i&1&&(Y(0),f(1),K()),i&2){let t=c(2);r(),b("[",t.duplicatesCount+1,"]")}}function Mt(i,s){if(i&1&&(h(0,"div"),f(1),S(2,Nt,2,1,"ng-container",4),p()),i&2){let t=c();m(t.options.titleClass),E("aria-label",t.title),r(),b(" ",t.title," "),r(),l("ngIf",t.duplicatesCount)}}function Pt(i,s){if(i&1&&F(0,"div",7),i&2){let t=c();m(t.options.messageClass),l("innerHTML",t.message,q)}}function Bt(i,s){if(i&1&&(h(0,"div",8),f(1),p()),i&2){let t=c();m(t.options.messageClass),E("aria-label",t.message),r(),b(" ",t.message," ")}}function $t(i,s){if(i&1&&(h(0,"div"),F(1,"div",9),p()),i&2){let t=c();r(),A("width",t.width()+"%")}}var et=class{_attachedHost;component;viewContainerRef;injector;constructor(s,t){this.component=s,this.injector=t}attach(s,t){return this._attachedHost=s,s.attach(this,t)}detach(){let s=this._attachedHost;if(s)return this._attachedHost=void 0,s.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(s){this._attachedHost=s}},it=class{_attachedPortal;_disposeFn;attach(s,t){return this._attachedPortal=s,this.attachComponentPortal(s,t)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(s){this._disposeFn=s}},st=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new g;_activate=new g;_manualClose=new g;_resetTimeout=new g;_countDuplicate=new g;constructor(s){this._overlayRef=s}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(s,t){s&&this._resetTimeout.next(),t&&this._countDuplicate.next(++this.duplicatesCount)}},D=class{toastId;config;message;title;toastType;toastRef;_onTap=new g;_onAction=new g;constructor(s,t,e,n,o,a){this.toastId=s,this.config=t,this.message=e,this.title=n,this.toastType=o,this.toastRef=a,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(s){this._onAction.next(s)}onAction(){return this._onAction.asObservable()}},vt={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},yt=new ct("ToastConfig"),nt=class extends it{_hostDomElement;_componentFactoryResolver;_appRef;constructor(s,t,e){super(),this._hostDomElement=s,this._componentFactoryResolver=t,this._appRef=e}attachComponentPortal(s,t){let e=this._componentFactoryResolver.resolveComponentFactory(s.component),n;return n=e.create(s.injector),this._appRef.attachView(n.hostView),this.setDisposeFn(()=>{this._appRef.detachView(n.hostView),n.destroy()}),t?this._hostDomElement.insertBefore(this._getComponentRootNode(n),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(n)),n}_getComponentRootNode(s){return s.hostView.rootNodes[0]}},Lt=(()=>{class i{_document=_(Z);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t=this._document.createElement("div");t.classList.add("overlay-container"),t.setAttribute("aria-live","polite"),this._document.body.appendChild(t),this._containerElement=t}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),ot=class{_portalHost;constructor(s){this._portalHost=s}attach(s,t=!0){return this._portalHost.attach(s,t)}detach(){return this._portalHost.detach()}},Vt=(()=>{class i{_overlayContainer=_(Lt);_componentFactoryResolver=_(dt);_appRef=_(M);_document=_(Z);_paneElements=new Map;create(t,e){return this._createOverlayRef(this.getPaneElement(t,e))}getPaneElement(t="",e){return this._paneElements.get(e)||this._paneElements.set(e,{}),this._paneElements.get(e)[t]||(this._paneElements.get(e)[t]=this._createPaneElement(t,e)),this._paneElements.get(e)[t]}_createPaneElement(t,e){let n=this._document.createElement("div");return n.id="toast-container",n.classList.add(t),n.classList.add("toast-container"),e?e.getContainerElement().appendChild(n):this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalHost(t){return new nt(t,this._componentFactoryResolver,this._appRef)}_createOverlayRef(t){return new ot(this._createPortalHost(t))}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),bt=(()=>{class i{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(t,e,n,o,a){this.overlay=e,this._injector=n,this.sanitizer=o,this.ngZone=a,this.toastrConfig=u(u({},t.default),t.config),t.config.iconClasses&&(this.toastrConfig.iconClasses=u(u({},t.default.iconClasses),t.config.iconClasses))}show(t,e,n={},o=""){return this._preBuildNotification(o,t,e,this.applyConfig(n))}success(t,e,n={}){let o=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}error(t,e,n={}){let o=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}info(t,e,n={}){let o=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}warning(t,e,n={}){let o=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}clear(t){for(let e of this.toasts)if(t!==void 0){if(e.toastId===t){e.toastRef.manualClose();return}}else e.toastRef.manualClose()}remove(t){let e=this._findToast(t);if(!e||(e.activeToast.toastRef.close(),this.toasts.splice(e.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){let n=this.toasts[this.currentlyActive].toastRef;n.isInactive()||(this.currentlyActive=this.currentlyActive+1,n.activate())}return!0}findDuplicate(t="",e="",n,o){let{includeTitleDuplicates:a}=this.toastrConfig;for(let d of this.toasts){let k=a&&d.title===t;if((!a||k)&&d.message===e)return d.toastRef.onDuplicate(n,o),d}return null}applyConfig(t={}){return u(u({},this.toastrConfig),t)}_findToast(t){for(let e=0;e<this.toasts.length;e++)if(this.toasts[e].toastId===t)return{index:e,activeToast:this.toasts[e]};return null}_preBuildNotification(t,e,n,o){return o.onActivateTick?this.ngZone.run(()=>this._buildNotification(t,e,n,o)):this._buildNotification(t,e,n,o)}_buildNotification(t,e,n,o){if(!o.toastComponent)throw new Error("toastComponent required");let a=this.findDuplicate(n,e,this.toastrConfig.resetTimeoutOnDuplicate&&o.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&n||e)&&this.toastrConfig.preventDuplicates&&a!==null)return a;this.previousToastMessage=e;let d=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(d=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let k=this.overlay.create(o.positionClass,this.overlayContainer);this.index=this.index+1;let rt=e;e&&o.enableHtml&&(rt=this.sanitizer.sanitize(ht.HTML,e));let I=new st(k),$=new D(this.index,o,rt,n,t,I),Ct=[{provide:D,useValue:$}],wt=N.create({providers:Ct,parent:this._injector}),Dt=new et(o.toastComponent,wt),at=k.attach(Dt,o.newestOnTop);I.componentInstance=at.instance;let L={toastId:this.index,title:n||"",message:e||"",toastRef:I,onShown:I.afterActivate(),onHidden:I.afterClosed(),onTap:$.onTap(),onAction:$.onAction(),portal:at};return d||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{L.toastRef.activate()})),this.toasts.push(L),L}static \u0275fac=function(e){return new(e||i)(w(yt),w(Vt),w(N),w(gt),w(U))};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),zt=(()=>{class i{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=O(-1);toastClasses="";state;get _state(){return this.state()}get displayStyle(){if(this.state().value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,n){this.toastrService=t,this.toastPackage=e,this.ngZone=n,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o}),this.state=O({value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.update(t=>T(u({},t),{value:"active"})),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(n=>100-n),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.update(t=>T(u({},t),{value:"active"})),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state().value!=="removed"&&(clearTimeout(this.timeout),this.state.update(t=>T(u({},t),{value:"removed"})),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state().value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state().value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state().value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(t),e)):this.timeout=setTimeout(()=>t(),e)}outsideInterval(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(t),e)):this.intervalId=setInterval(()=>t(),e)}runInsideAngular(t){this.ngZone?this.ngZone.run(()=>t()):t()}static \u0275fac=function(e){return new(e||i)(y(bt),y(D),y(U))};static \u0275cmp=G({type:i,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(e,n){e&1&&j("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(mt("@flyInOut",n._state),m(n.toastClasses),A("display",n.displayStyle))},attrs:_t,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,n){e&1&&S(0,Et,3,0,"button",0)(1,jt,3,5,"div",1)(2,At,1,3,"div",2)(3,Rt,2,4,"div",3)(4,Ht,2,2,"div",4),e&2&&(l("ngIf",n.options.closeButton),r(),l("ngIf",n.title),r(),l("ngIf",n.message&&n.options.enableHtml),r(),l("ngIf",n.message&&!n.options.enableHtml),r(),l("ngIf",n.options.progressBar))},dependencies:[J],encapsulation:2,data:{animation:[tt("flyInOut",[H("inactive",R({opacity:0})),H("active",R({opacity:1})),H("removed",R({opacity:0})),B("inactive => active",P("{{ easeTime }}ms {{ easing }}")),B("active => removed",P("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return i})(),Zt=T(u({},vt),{toastComponent:zt}),qt=(i={})=>ut([{provide:yt,useValue:{default:Zt,config:i}}]),be=(()=>{class i{static forRoot(t={}){return{ngModule:i,providers:[qt(t)]}}static \u0275fac=function(e){return new(e||i)};static \u0275mod=pt({type:i});static \u0275inj=lt({})}return i})();var Gt=(()=>{class i{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=O(-1);toastClasses="";get displayStyle(){return this.state()==="inactive"?"none":null}state=O("inactive");timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,n){this.toastrService=t,this.toastPackage=e,this.appRef=n,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.set("active"),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(n=>100-n),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.set("active"),this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.state.set("removed"),this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){this.state()!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state()==="removed"||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(e){return new(e||i)(y(bt),y(D),y(M))};static \u0275cmp=G({type:i,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(e,n){e&1&&j("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(m(n.toastClasses),A("display",n.displayStyle))},attrs:_t,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,n){e&1&&S(0,kt,3,0,"button",0)(1,Mt,3,5,"div",1)(2,Pt,1,3,"div",2)(3,Bt,2,4,"div",3)(4,$t,2,2,"div",4),e&2&&(l("ngIf",n.options.closeButton),r(),l("ngIf",n.title),r(),l("ngIf",n.message&&n.options.enableHtml),r(),l("ngIf",n.message&&!n.options.enableHtml),r(),l("ngIf",n.options.progressBar))},dependencies:[J],encapsulation:2,changeDetection:0})}return i})(),Te=T(u({},vt),{toastComponent:Gt});var x={serverTarget:Tt().version,production:!0,socket:"",api:{base:"/api",socket:`${window.location.protocol==="http:"?"ws://":"wss://"}${window.location.host}`,origin:window.location.origin},jwt:{tokenKey:"access_token",allowedDomains:[document.location.host],disallowedRoutes:[`${window.location.protocol}//${document.location.host}/api/auth/login`]},apiHttpOptions:{},owm:{appid:"fec67b55f7f74deaa28df89ba6a60821"}};var Fe=(()=>{class i{$http=_(ft);constructor(){}get(t,e){return this.$http.get(`${x.api.base}${t}`,e)}post(t,e,n){return this.$http.post(`${x.api.base}${t}`,e,n)}put(t,e,n){return this.$http.put(`${x.api.base}${t}`,e,n)}patch(t,e,n){return this.$http.patch(`${x.api.base}${t}`,e,n)}delete(t,e){return this.$http.delete(`${x.api.base}${t}`,e)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{v as a,It as b,Yt as c,R as d,W as e,X as f,Ot as g,bt as h,be as i,x as j,Fe as k};
1
+ import{e as ft,m as gt}from"./chunk-ASBFWS7L.js";import{$a as r,Fb as M,Gb as E,Nb as l,Ob as h,Pb as p,Qb as F,Rb as Y,Sb as K,Ub as Q,Wa as ht,Wb as mt,Xa as q,Xb as j,Yb as c,a as u,b as T,cb as dt,dd as J,e as xt,fb as y,ga as C,gc as A,ha as lt,ic as m,ja as ct,jc as f,ka as w,la as _,lb as G,lc as b,ma as ut,mb as pt,n as g,ra as V,rb as S,sa as z,ua as N,ub as U,va as Z,za as O}from"./chunk-U4V4ICSI.js";var Tt=xt((De,Ut)=>{Ut.exports={name:"homebridge-config-ui-x",displayName:"Homebridge UI",version:"5.0.0-beta.78",description:"A web based management, configuration and control platform for Homebridge.",author:"oznu <dev@oz.nu>",license:"MIT",funding:[{type:"github",url:"https://github.com/sponsors/oznu"},{type:"paypal",url:"https://paypal.me/oznu"}],repository:{type:"git",url:"git+https://github.com/homebridge/homebridge-config-ui-x.git"},bugs:{url:"https://github.com/homebridge/homebridge-config-ui-x/issues"},keywords:["homebridge-plugin","ui","gui","web","homebridge","homebridge-config-ui-x","ui-x","config-ui-x","homebridge-x","homebridge server","homebridge ui","homebridge-ui","homebridge gui","homebridge-gui","web interface","config ui","management","config editor","linux","macOS","osx","windows","raspberry pi","accessory control","smart home","hb-service"],main:"./dist/index.js",bin:{"homebridge-config-ui-x":"dist/bin/standalone.js","hb-service":"dist/bin/hb-service.js"},engines:{node:"^20 || ^22",homebridge:"^1.8.0 || ^2.0.0-beta.0"},scripts:{build:"npm run build:server && npm run build:ui","build:server":"rimraf dist && tsc -p tsconfig.build.json","build:ui":"npm run build --prefix ui",check:"npm run check:server && npm run check:ui","check:server":"npm install && npm outdated","check:ui":"npm install --prefix ui && npm outdated --prefix ui","lang-sync":"ts-node scripts/lang-sync.ts",lint:"eslint . --max-warnings=0","lint:fix":"npm run lint -- --fix",prepublishOnly:"npm i --package-lock-only && npm run lint && npm run build",start:"ts-node -r tsconfig-paths/register src/main.ts",test:"vitest run","test-coverage":"npm run test -- --coverage","upgrade-install":"./scripts/upgrade-install.sh",watch:'concurrently "npm run watch:ui" "npm run watch:server"',"watch:server":"nodemon","watch:ui":"npm run start --prefix ui"},dependencies:{"@fastify/helmet":"13.0.1","@fastify/multipart":"9.0.3","@fastify/static":"8.2.0","@homebridge/hap-client":"2.2.0","@homebridge/node-pty-prebuilt-multiarch":"0.12.0","@nestjs/axios":"4.0.0","@nestjs/common":"11.1.2","@nestjs/core":"11.1.2","@nestjs/jwt":"11.0.0","@nestjs/passport":"11.0.5","@nestjs/platform-fastify":"11.1.2","@nestjs/platform-socket.io":"11.1.2","@nestjs/swagger":"11.2.0","@nestjs/websockets":"11.1.2",axios:"1.9.0","bash-color":"0.0.4","class-transformer":"0.5.1","class-validator":"0.14.2",commander:"14.0.0",dayjs:"1.11.13",fastify:"5.3.3","fs-extra":"11.3.0",jsonwebtoken:"9.0.2",lodash:"4.17.21","node-cache":"5.1.2","node-schedule":"2.1.1",ora:"5.4.1",otplib:"12.0.1","p-limit":"3.1.0",passport:"0.7.0","passport-jwt":"4.0.1","reflect-metadata":"0.2.2",rxjs:"7.8.2",semver:"7.7.2",systeminformation:"5.27.1",tail:"2.2.6",tar:"7.4.3","tcp-port-used":"1.0.2",unzipper:"0.12.3"},devDependencies:{"@antfu/eslint-config":"^4.13.2","@nestjs/testing":"^11.1.1","@prettier/plugin-xml":"^3.4.1","@types/fs-extra":"^11.0.4","@types/lodash":"^4.17.17","@types/node":"^22.15.29","@types/node-schedule":"^2.1.7","@types/passport-jwt":"^4.0.1","@types/semver":"^7.7.0","@types/tail":"^2.2.3","@types/tcp-port-used":"^1.0.4","@types/unzipper":"^0.10.11","@vitest/coverage-v8":"^3.2.0",concurrently:"^9.1.2","eslint-plugin-format":"^1.0.1","form-data":"^4.0.2",nodemon:"^3.1.10",rimraf:"^6.0.1","ts-loader":"^9.5.2","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0",typescript:"^5.8.3","unplugin-swc":"^1.5.4",vitest:"^3.2.0"},maintainers:[{email:"bwp91@icloud.com",name:"bwp91"},{email:"dev@oz.nu",name:"oznu"},{email:"northern.man1@gmail.com",name:"northernman"},{email:"mail@anderl-bauer.de",name:"supereg"},{email:"khaos.tian@gmail.com",name:"khaost"},{email:"erik.baauw@xs4all.nl",name:"ebaauw"},{email:"donavan.becker@icloud.com",name:"donavanbecker"},{email:"dustin.greif@gmail.com",name:"dustin.greif"},{email:"nfarina@gmail.com",name:"nfarina"}],scarfSettings:{enabled:!1}}});var v=function(i){return i[i.State=0]="State",i[i.Transition=1]="Transition",i[i.Sequence=2]="Sequence",i[i.Group=3]="Group",i[i.Animate=4]="Animate",i[i.Keyframes=5]="Keyframes",i[i.Style=6]="Style",i[i.Trigger=7]="Trigger",i[i.Reference=8]="Reference",i[i.AnimateChild=9]="AnimateChild",i[i.AnimateRef=10]="AnimateRef",i[i.Query=11]="Query",i[i.Stagger=12]="Stagger",i}(v||{}),It="*";function tt(i,s){return{type:v.Trigger,name:i,definitions:s,options:{}}}function P(i,s=null){return{type:v.Animate,styles:s,timings:i}}function Yt(i,s=null){return{type:v.Sequence,steps:i,options:s}}function R(i){return{type:v.Style,styles:i,offset:null}}function H(i,s,t){return{type:v.State,name:i,styles:s,options:t}}function B(i,s,t=null){return{type:v.Transition,expr:i,animation:s,options:t}}var W=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(s=0,t=0){this.totalTime=s+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(s=>s()),this._onDoneFns=[])}onStart(s){this._originalOnStartFns.push(s),this._onStartFns.push(s)}onDone(s){this._originalOnDoneFns.push(s),this._onDoneFns.push(s)}onDestroy(s){this._onDestroyFns.push(s)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(s=>s()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(s=>s()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(s){this._position=this.totalTime?s*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(s){let t=s=="start"?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}},X=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(s){this.players=s;let t=0,e=0,n=0,o=this.players.length;o==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(a=>{a.onDone(()=>{++t==o&&this._onFinish()}),a.onDestroy(()=>{++e==o&&this._onDestroy()}),a.onStart(()=>{++n==o&&this._onStart()})}),this.totalTime=this.players.reduce((a,d)=>Math.max(a,d.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(s=>s()),this._onDoneFns=[])}init(){this.players.forEach(s=>s.init())}onStart(s){this._onStartFns.push(s)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(s=>s()),this._onStartFns=[])}onDone(s){this._onDoneFns.push(s)}onDestroy(s){this._onDestroyFns.push(s)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(s=>s.play())}pause(){this.players.forEach(s=>s.pause())}restart(){this.players.forEach(s=>s.restart())}finish(){this._onFinish(),this.players.forEach(s=>s.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(s=>s.destroy()),this._onDestroyFns.forEach(s=>s()),this._onDestroyFns=[])}reset(){this.players.forEach(s=>s.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(s){let t=s*this.totalTime;this.players.forEach(e=>{let n=e.totalTime?Math.min(1,t/e.totalTime):1;e.setPosition(n)})}getPosition(){let s=this.players.reduce((t,e)=>t===null||e.totalTime>t.totalTime?e:t,null);return s!=null?s.getPosition():0}beforeDestroy(){this.players.forEach(s=>{s.beforeDestroy&&s.beforeDestroy()})}triggerCallback(s){let t=s=="start"?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}},Ot="!";var _t=["toast-component",""];function Et(i,s){if(i&1){let t=Q();h(0,"button",5),j("click",function(){V(t);let n=c();return z(n.remove())}),h(1,"span",6),f(2,"\xD7"),p()()}}function Ft(i,s){if(i&1&&(Y(0),f(1),K()),i&2){let t=c(2);r(),b("[",t.duplicatesCount+1,"]")}}function jt(i,s){if(i&1&&(h(0,"div"),f(1),S(2,Ft,2,1,"ng-container",4),p()),i&2){let t=c();m(t.options.titleClass),E("aria-label",t.title),r(),b(" ",t.title," "),r(),l("ngIf",t.duplicatesCount)}}function At(i,s){if(i&1&&F(0,"div",7),i&2){let t=c();m(t.options.messageClass),l("innerHTML",t.message,q)}}function Rt(i,s){if(i&1&&(h(0,"div",8),f(1),p()),i&2){let t=c();m(t.options.messageClass),E("aria-label",t.message),r(),b(" ",t.message," ")}}function Ht(i,s){if(i&1&&(h(0,"div"),F(1,"div",9),p()),i&2){let t=c();r(),A("width",t.width()+"%")}}function kt(i,s){if(i&1){let t=Q();h(0,"button",5),j("click",function(){V(t);let n=c();return z(n.remove())}),h(1,"span",6),f(2,"\xD7"),p()()}}function Nt(i,s){if(i&1&&(Y(0),f(1),K()),i&2){let t=c(2);r(),b("[",t.duplicatesCount+1,"]")}}function Mt(i,s){if(i&1&&(h(0,"div"),f(1),S(2,Nt,2,1,"ng-container",4),p()),i&2){let t=c();m(t.options.titleClass),E("aria-label",t.title),r(),b(" ",t.title," "),r(),l("ngIf",t.duplicatesCount)}}function Pt(i,s){if(i&1&&F(0,"div",7),i&2){let t=c();m(t.options.messageClass),l("innerHTML",t.message,q)}}function Bt(i,s){if(i&1&&(h(0,"div",8),f(1),p()),i&2){let t=c();m(t.options.messageClass),E("aria-label",t.message),r(),b(" ",t.message," ")}}function $t(i,s){if(i&1&&(h(0,"div"),F(1,"div",9),p()),i&2){let t=c();r(),A("width",t.width()+"%")}}var et=class{_attachedHost;component;viewContainerRef;injector;constructor(s,t){this.component=s,this.injector=t}attach(s,t){return this._attachedHost=s,s.attach(this,t)}detach(){let s=this._attachedHost;if(s)return this._attachedHost=void 0,s.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(s){this._attachedHost=s}},it=class{_attachedPortal;_disposeFn;attach(s,t){return this._attachedPortal=s,this.attachComponentPortal(s,t)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(s){this._disposeFn=s}},st=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new g;_activate=new g;_manualClose=new g;_resetTimeout=new g;_countDuplicate=new g;constructor(s){this._overlayRef=s}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(s,t){s&&this._resetTimeout.next(),t&&this._countDuplicate.next(++this.duplicatesCount)}},D=class{toastId;config;message;title;toastType;toastRef;_onTap=new g;_onAction=new g;constructor(s,t,e,n,o,a){this.toastId=s,this.config=t,this.message=e,this.title=n,this.toastType=o,this.toastRef=a,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(s){this._onAction.next(s)}onAction(){return this._onAction.asObservable()}},vt={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},yt=new ct("ToastConfig"),nt=class extends it{_hostDomElement;_componentFactoryResolver;_appRef;constructor(s,t,e){super(),this._hostDomElement=s,this._componentFactoryResolver=t,this._appRef=e}attachComponentPortal(s,t){let e=this._componentFactoryResolver.resolveComponentFactory(s.component),n;return n=e.create(s.injector),this._appRef.attachView(n.hostView),this.setDisposeFn(()=>{this._appRef.detachView(n.hostView),n.destroy()}),t?this._hostDomElement.insertBefore(this._getComponentRootNode(n),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(n)),n}_getComponentRootNode(s){return s.hostView.rootNodes[0]}},Lt=(()=>{class i{_document=_(Z);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t=this._document.createElement("div");t.classList.add("overlay-container"),t.setAttribute("aria-live","polite"),this._document.body.appendChild(t),this._containerElement=t}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),ot=class{_portalHost;constructor(s){this._portalHost=s}attach(s,t=!0){return this._portalHost.attach(s,t)}detach(){return this._portalHost.detach()}},Vt=(()=>{class i{_overlayContainer=_(Lt);_componentFactoryResolver=_(dt);_appRef=_(M);_document=_(Z);_paneElements=new Map;create(t,e){return this._createOverlayRef(this.getPaneElement(t,e))}getPaneElement(t="",e){return this._paneElements.get(e)||this._paneElements.set(e,{}),this._paneElements.get(e)[t]||(this._paneElements.get(e)[t]=this._createPaneElement(t,e)),this._paneElements.get(e)[t]}_createPaneElement(t,e){let n=this._document.createElement("div");return n.id="toast-container",n.classList.add(t),n.classList.add("toast-container"),e?e.getContainerElement().appendChild(n):this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalHost(t){return new nt(t,this._componentFactoryResolver,this._appRef)}_createOverlayRef(t){return new ot(this._createPortalHost(t))}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),bt=(()=>{class i{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(t,e,n,o,a){this.overlay=e,this._injector=n,this.sanitizer=o,this.ngZone=a,this.toastrConfig=u(u({},t.default),t.config),t.config.iconClasses&&(this.toastrConfig.iconClasses=u(u({},t.default.iconClasses),t.config.iconClasses))}show(t,e,n={},o=""){return this._preBuildNotification(o,t,e,this.applyConfig(n))}success(t,e,n={}){let o=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}error(t,e,n={}){let o=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}info(t,e,n={}){let o=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}warning(t,e,n={}){let o=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}clear(t){for(let e of this.toasts)if(t!==void 0){if(e.toastId===t){e.toastRef.manualClose();return}}else e.toastRef.manualClose()}remove(t){let e=this._findToast(t);if(!e||(e.activeToast.toastRef.close(),this.toasts.splice(e.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){let n=this.toasts[this.currentlyActive].toastRef;n.isInactive()||(this.currentlyActive=this.currentlyActive+1,n.activate())}return!0}findDuplicate(t="",e="",n,o){let{includeTitleDuplicates:a}=this.toastrConfig;for(let d of this.toasts){let k=a&&d.title===t;if((!a||k)&&d.message===e)return d.toastRef.onDuplicate(n,o),d}return null}applyConfig(t={}){return u(u({},this.toastrConfig),t)}_findToast(t){for(let e=0;e<this.toasts.length;e++)if(this.toasts[e].toastId===t)return{index:e,activeToast:this.toasts[e]};return null}_preBuildNotification(t,e,n,o){return o.onActivateTick?this.ngZone.run(()=>this._buildNotification(t,e,n,o)):this._buildNotification(t,e,n,o)}_buildNotification(t,e,n,o){if(!o.toastComponent)throw new Error("toastComponent required");let a=this.findDuplicate(n,e,this.toastrConfig.resetTimeoutOnDuplicate&&o.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&n||e)&&this.toastrConfig.preventDuplicates&&a!==null)return a;this.previousToastMessage=e;let d=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(d=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let k=this.overlay.create(o.positionClass,this.overlayContainer);this.index=this.index+1;let rt=e;e&&o.enableHtml&&(rt=this.sanitizer.sanitize(ht.HTML,e));let I=new st(k),$=new D(this.index,o,rt,n,t,I),Ct=[{provide:D,useValue:$}],wt=N.create({providers:Ct,parent:this._injector}),Dt=new et(o.toastComponent,wt),at=k.attach(Dt,o.newestOnTop);I.componentInstance=at.instance;let L={toastId:this.index,title:n||"",message:e||"",toastRef:I,onShown:I.afterActivate(),onHidden:I.afterClosed(),onTap:$.onTap(),onAction:$.onAction(),portal:at};return d||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{L.toastRef.activate()})),this.toasts.push(L),L}static \u0275fac=function(e){return new(e||i)(w(yt),w(Vt),w(N),w(gt),w(U))};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),zt=(()=>{class i{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=O(-1);toastClasses="";state;get _state(){return this.state()}get displayStyle(){if(this.state().value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,n){this.toastrService=t,this.toastPackage=e,this.ngZone=n,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o}),this.state=O({value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.update(t=>T(u({},t),{value:"active"})),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(n=>100-n),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.update(t=>T(u({},t),{value:"active"})),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state().value!=="removed"&&(clearTimeout(this.timeout),this.state.update(t=>T(u({},t),{value:"removed"})),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state().value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state().value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state().value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(t),e)):this.timeout=setTimeout(()=>t(),e)}outsideInterval(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(t),e)):this.intervalId=setInterval(()=>t(),e)}runInsideAngular(t){this.ngZone?this.ngZone.run(()=>t()):t()}static \u0275fac=function(e){return new(e||i)(y(bt),y(D),y(U))};static \u0275cmp=G({type:i,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(e,n){e&1&&j("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(mt("@flyInOut",n._state),m(n.toastClasses),A("display",n.displayStyle))},attrs:_t,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,n){e&1&&S(0,Et,3,0,"button",0)(1,jt,3,5,"div",1)(2,At,1,3,"div",2)(3,Rt,2,4,"div",3)(4,Ht,2,2,"div",4),e&2&&(l("ngIf",n.options.closeButton),r(),l("ngIf",n.title),r(),l("ngIf",n.message&&n.options.enableHtml),r(),l("ngIf",n.message&&!n.options.enableHtml),r(),l("ngIf",n.options.progressBar))},dependencies:[J],encapsulation:2,data:{animation:[tt("flyInOut",[H("inactive",R({opacity:0})),H("active",R({opacity:1})),H("removed",R({opacity:0})),B("inactive => active",P("{{ easeTime }}ms {{ easing }}")),B("active => removed",P("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return i})(),Zt=T(u({},vt),{toastComponent:zt}),qt=(i={})=>ut([{provide:yt,useValue:{default:Zt,config:i}}]),be=(()=>{class i{static forRoot(t={}){return{ngModule:i,providers:[qt(t)]}}static \u0275fac=function(e){return new(e||i)};static \u0275mod=pt({type:i});static \u0275inj=lt({})}return i})();var Gt=(()=>{class i{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=O(-1);toastClasses="";get displayStyle(){return this.state()==="inactive"?"none":null}state=O("inactive");timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,n){this.toastrService=t,this.toastPackage=e,this.appRef=n,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.set("active"),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(n=>100-n),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.set("active"),this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.state.set("removed"),this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){this.state()!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state()==="removed"||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(e){return new(e||i)(y(bt),y(D),y(M))};static \u0275cmp=G({type:i,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(e,n){e&1&&j("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(m(n.toastClasses),A("display",n.displayStyle))},attrs:_t,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,n){e&1&&S(0,kt,3,0,"button",0)(1,Mt,3,5,"div",1)(2,Pt,1,3,"div",2)(3,Bt,2,4,"div",3)(4,$t,2,2,"div",4),e&2&&(l("ngIf",n.options.closeButton),r(),l("ngIf",n.title),r(),l("ngIf",n.message&&n.options.enableHtml),r(),l("ngIf",n.message&&!n.options.enableHtml),r(),l("ngIf",n.options.progressBar))},dependencies:[J],encapsulation:2,changeDetection:0})}return i})(),Te=T(u({},vt),{toastComponent:Gt});var x={serverTarget:Tt().version,production:!0,socket:"",api:{base:"/api",socket:`${window.location.protocol==="http:"?"ws://":"wss://"}${window.location.host}`,origin:window.location.origin},jwt:{tokenKey:"access_token",allowedDomains:[document.location.host],disallowedRoutes:[`${window.location.protocol}//${document.location.host}/api/auth/login`]},apiHttpOptions:{},owm:{appid:"fec67b55f7f74deaa28df89ba6a60821"}};var Fe=(()=>{class i{$http=_(ft);constructor(){}get(t,e){return this.$http.get(`${x.api.base}${t}`,e)}post(t,e,n){return this.$http.post(`${x.api.base}${t}`,e,n)}put(t,e,n){return this.$http.put(`${x.api.base}${t}`,e,n)}patch(t,e,n){return this.$http.patch(`${x.api.base}${t}`,e,n)}delete(t,e){return this.$http.delete(`${x.api.base}${t}`,e)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{v as a,It as b,Yt as c,R as d,W as e,X as f,Ot as g,bt as h,be as i,x as j,Fe as k};
@@ -0,0 +1 @@
1
+ import{A as j,c as $,d as C,e as T,f as N,g as q,j as w,m as H,p as z,q as D,w as G,x as Q,z as A}from"./chunk-HLSZVFAU.js";import{d as U}from"./chunk-QR7L4UUP.js";import{c as X}from"./chunk-5GPU7OWP.js";import{b as K}from"./chunk-3ZZZY5X3.js";import{j as J}from"./chunk-737XQ2KH.js";import{b as W}from"./chunk-DJKI5XBW.js";import{$a as n,Ac as l,Bc as d,Hb as p,Ib as u,Lc as b,M as I,Nb as m,Nc as V,Ob as r,Pb as a,Qb as s,Xa as x,Xb as M,Yb as F,bd as B,dc as v,ec as L,ed as O,fb as k,h as y,jc as c,kc as h,la as f,lb as E,lc as P,sd as R,w as S,wc as g}from"./chunk-U4V4ICSI.js";var Z=["password"],ee=["username"],te=["otp"],ie=e=>({background:e}),ne=e=>({anim:e}),Y=e=>({"is-invalid":e});function oe(e,_){if(e&1&&(r(0,"div",8)(1,"span",12),s(2,"i",13),a(),s(3,"input",14,0),l(5,"translate"),a(),r(6,"div",8)(7,"span",12),s(8,"i",15),a(),s(9,"input",16,1),l(11,"translate"),a()),e&2){let i=F();n(3),m("placeholder",d(5,4,"users.label_username"))("ngClass",g(8,Y,i.form.controls.username.dirty&&i.form.controls.username.errors)),n(6),m("placeholder",d(11,6,"users.label_password"))("ngClass",g(10,Y,i.form.controls.password.dirty&&i.form.controls.password.errors))}}function ae(e,_){e&1&&(r(0,"div",8)(1,"span",12),s(2,"i",17),a(),s(3,"input",18,2),l(5,"translate"),a()),e&2&&(n(3),m("placeholder",d(5,1,"login.label_2fa_code")))}function re(e,_){e&1&&(r(0,"div",9)(1,"div",12),s(2,"i",19),a(),r(3,"div",20)(4,"div",21),c(5),l(6,"translate"),a(),s(7,"div",22),l(8,"translate"),a()()),e&2&&(n(5),h(d(6,2,"login.invalid_credentials")),n(2),m("innerHTML",d(8,4,"login.invalid_credentials_2"),x))}function se(e,_){e&1&&(r(0,"div",9)(1,"div",12),s(2,"i",19),a(),r(3,"div",20)(4,"div",21),c(5),l(6,"translate"),a(),s(7,"div",22),l(8,"translate"),a()()),e&2&&(n(5),h(d(6,2,"login.invalid_code")),n(2),m("innerHTML",d(8,4,"login.invalid_credentials_2"),x))}var ye=(()=>{class e{cdr;$auth=f(X);$router=f(U);$settings=f(K);passwordInput=b("password");usernameInput=b("username");otpInput=b("otp");form;backgroundStyle;invalidCredentials=!1;invalid2faCode=!1;twoFactorCodeRequired=!1;inProgress=!1;targetRoute;constructor(i){this.cdr=i}ngOnInit(){this.form=new q({username:new w(""),password:new w("")}),this.form.valueChanges.pipe(I(500)).subscribe(i=>{let o=this.passwordInput()?.nativeElement.value;o&&o!==i.password&&this.form.controls.password.setValue(o)}),this.targetRoute=window.sessionStorage.getItem("target_route")||"",this.setBackground()}ngAfterViewChecked(){this.cdr.detectChanges()}setBackground(){return y(this,null,function*(){if(this.$settings.settingsLoaded||(yield S(this.$settings.onSettingsLoaded)),this.$settings.env.customWallpaperHash&&this.$settings.env.customWallpaperHash){let i=`${J.api.base}/auth/wallpaper/${this.$settings.env.customWallpaperHash}`;this.backgroundStyle=`url('${i}') center/cover`}})}onSubmit(){return y(this,null,function*(){this.invalidCredentials=!1,this.invalid2faCode=!1,this.inProgress=!0,document.getElementById("submit-button")?.blur();let i=this.passwordInput()?.nativeElement.value;i&&i!==this.form.get("password").value&&this.form.controls.password.setValue(i);let o=this.usernameInput()?.nativeElement.value;if(o&&o!==this.form.get("username").value&&this.form.controls.username.setValue(o),this.twoFactorCodeRequired){let t=this.otpInput()?.nativeElement.value;t&&t!==this.form.get("otp").value&&this.form.controls.username.setValue(t)}try{yield this.$auth.login(this.form.getRawValue()),this.$router.navigateByUrl(this.targetRoute),window.sessionStorage.removeItem("target_route")}catch(t){t.status===412?(this.form.controls.otp?(this.form.controls.otp.setErrors(["Invalid Code"]),this.invalid2faCode=!0):this.form.addControl("otp",new w("",[C.required,C.minLength(6),C.maxLength(6)])),this.twoFactorCodeRequired=!0,setTimeout(()=>{document.getElementById("form-ota").focus()},100)):this.invalidCredentials=!0}this.inProgress=!1})}static \u0275fac=function(o){return new(o||e)(k(V))};static \u0275cmp=E({type:e,selectors:[["ng-component"]],viewQuery:function(o,t){o&1&&(v(t.passwordInput,Z,5),v(t.usernameInput,ee,5),v(t.otpInput,te,5)),o&2&&L(3)},decls:15,vars:18,consts:[["username",""],["password",""],["otp",""],[1,"login-container","gradient","d-flex","align-items-start","justify-content-center",3,"ngStyle","ngClass"],[1,"w-100","login-card","d-flex","py-4","flex-column"],["ngSrc","/assets/homebridge-color-round.svg","alt","Homebridge Logo","height","100","width","100","priority","true",1,"homebridge-logo","mx-auto","my-3"],["novalidate","",3,"ngSubmit","formGroup"],[1,"mb-4","text-center"],[1,"input-group","mb-4"],[1,"input-group","no-border","mb-4"],[1,"text-center"],["tabindex","3","id","submit-button","type","submit",1,"btn","btn-primary","mb-4",3,"disabled"],[1,"input-group-text","custom-input"],[1,"fas","fa-fw","fa-user","primary-text","fa-lg"],["formControlName","username","type","text","id","form-username","autofocus","","autocomplete","username","autocapitalize","none","tabindex","1","required","",1,"form-control","custom-input",3,"placeholder","ngClass"],[1,"fas","fa-fw","fa-lock","primary-text","fa-lg"],["formControlName","password","type","password","id","form-pass","autocomplete","current-password","tabindex","2","required","",1,"form-control","custom-input",3,"placeholder","ngClass"],[1,"fas","fa-fw","fa-key","primary-text","fa-lg"],["formControlName","otp","type","text","id","form-ota","autofocus","","autocomplete","one-time-code","autocapitalize","none","inputmode","numeric","pattern","[0-9]*","tabindex","1",1,"form-control","custom-input",3,"placeholder"],[1,"fas","fa-fw","fa-exclamation-triangle","pink-text","fa-lg"],[1,"form-control","custom-input"],[1,"small","grey-text","fw-semibold"],[1,"small","grey-text",3,"innerHTML"]],template:function(o,t){o&1&&(r(0,"div",3)(1,"div",4),s(2,"img",5),r(3,"form",6),M("ngSubmit",function(){return t.onSubmit()}),r(4,"h4",7),c(5),l(6,"translate"),a(),p(7,oe,12,12),p(8,ae,6,3,"div",8),p(9,re,9,6,"div",9),p(10,se,9,6,"div",9),r(11,"div",10)(12,"button",11),c(13),l(14,"translate"),a()()()()()),o&2&&(m("ngStyle",g(14,ie,t.backgroundStyle))("ngClass",g(16,ne,!t.backgroundStyle)),n(3),m("formGroup",t.form),n(2),h(d(6,10,"setup.welcome_to_homebridge")),n(2),u(t.twoFactorCodeRequired?-1:7),n(),u(t.twoFactorCodeRequired?8:-1),n(),u(t.invalidCredentials?9:-1),n(),u(t.invalid2faCode?10:-1),n(2),m("disabled",t.form.invalid),n(),P(" ",d(14,12,"form.label_continue")," "))},dependencies:[O,A,H,$,T,N,G,Q,j,z,D,B,W,R],styles:["body{overflow:scroll!important} body.dark-mode .login-card{background-color:#2b2b2b;color:#fff}.login-container[_ngcontent-%COMP%]{z-index:-1;padding-top:2em;padding-bottom:2em;min-height:100%;background-size:300% 300%}.anim[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_gradient 20s ease infinite;-moz-animation:gradient 20s ease infinite;-o-animation:gradient 20s ease infinite;animation:_ngcontent-%COMP%_gradient 20s ease infinite}@keyframes _ngcontent-%COMP%_gradient{0%{background-position:0 50%}50%{background-position:100% 50%}to{background-position:0 50%}}.login-card[_ngcontent-%COMP%]{max-width:550px;border-radius:1rem;padding-right:25px;padding-left:25px;background-color:#ffffffe6}.login-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (max-width: 575px){.login-card[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em}}.homebridge-logo[_ngcontent-%COMP%]{margin-bottom:10px}.btn-primary[_ngcontent-%COMP%]{background-color:#4a266c!important;border-color:#4a266c!important}"]})}return e})();export{ye as a};
@@ -1 +1 @@
1
- import{a as f,b as u}from"./chunk-3KEKNJHK.js";import{a as d}from"./chunk-V2SMMSMC.js";import{c as p}from"./chunk-IP3KHS2K.js";import"./chunk-OOXWGEYZ.js";import"./chunk-3VIG5M5R.js";import"./chunk-XZR7OZ6I.js";import{q as n}from"./chunk-7S2SCSTB.js";import{z as s}from"./chunk-HLSZVFAU.js";import"./chunk-XH4RYJ6Y.js";import{g as i}from"./chunk-QR7L4UUP.js";import"./chunk-5BL6PCNR.js";import"./chunk-G43HU5Q5.js";import"./chunk-ZHNSZ7X2.js";import"./chunk-ASBFWS7L.js";import{c}from"./chunk-DJKI5XBW.js";import{ha as r,kd as m,mb as e}from"./chunk-U4V4ICSI.js";var C=[{path:"",loadComponent:()=>import("./chunk-BCSWG6SE.js").then(o=>o.AccessoriesComponent)}],l=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=e({type:o});static \u0275inj=r({imports:[i.forChild(C),i]})}return o})();var S=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=e({type:o});static \u0275inj=r({imports:[m,s,n,p,c.forChild(),d,l,u,f]})}return o})();export{S as AccessoriesModule};
1
+ import{a as f,b as u}from"./chunk-TT6Q7AVH.js";import{a as d}from"./chunk-VFMIRYAL.js";import{c as p}from"./chunk-3SXGHQEL.js";import"./chunk-WU5ATTVG.js";import"./chunk-3VIG5M5R.js";import"./chunk-XZR7OZ6I.js";import{q as n}from"./chunk-7S2SCSTB.js";import{z as s}from"./chunk-HLSZVFAU.js";import"./chunk-DW3UVCVP.js";import{g as i}from"./chunk-QR7L4UUP.js";import"./chunk-5GPU7OWP.js";import"./chunk-3ZZZY5X3.js";import"./chunk-737XQ2KH.js";import"./chunk-ASBFWS7L.js";import{c}from"./chunk-DJKI5XBW.js";import{ha as r,kd as m,mb as e}from"./chunk-U4V4ICSI.js";var C=[{path:"",loadComponent:()=>import("./chunk-4SQ4UEKE.js").then(o=>o.AccessoriesComponent)}],l=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=e({type:o});static \u0275inj=r({imports:[i.forChild(C),i]})}return o})();var S=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=e({type:o});static \u0275inj=r({imports:[m,s,n,p,c.forChild(),d,l,u,f]})}return o})();export{S as AccessoriesModule};
@@ -1 +1 @@
1
- import{d as i}from"./chunk-QR7L4UUP.js";import{c as s}from"./chunk-5BL6PCNR.js";import{h as o}from"./chunk-ZHNSZ7X2.js";import{a}from"./chunk-DJKI5XBW.js";import{ga as e,la as r}from"./chunk-U4V4ICSI.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-QR7L4UUP.js";import{c as s}from"./chunk-5GPU7OWP.js";import{h as o}from"./chunk-737XQ2KH.js";import{a}from"./chunk-DJKI5XBW.js";import{ga as e,la as r}from"./chunk-U4V4ICSI.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,4 +1,4 @@
1
- import{a as uu,b as Z6}from"./chunk-A3GH5UM5.js";import{a as S1}from"./chunk-CHQVUHUA.js";import{a as en,b as tn}from"./chunk-3VIG5M5R.js";import{a as T1}from"./chunk-XZR7OZ6I.js";import{a as O1}from"./chunk-ETPKWO5V.js";import{a as P1}from"./chunk-FHMZVMZK.js";import{a as of}from"./chunk-JMCN2SQV.js";import{a as A1,b as k1}from"./chunk-YXEV6KOV.js";import{a as ss}from"./chunk-LTDUXFUG.js";import{a as $1}from"./chunk-2PGR64P5.js";import{a as Ur,b as Wr,c as Gr,d as Kr,e as Jr,f as Xr,g as Yi,m as ve,n as it,o as Zi}from"./chunk-7S2SCSTB.js";import{A as as,a as E1,b as Gi,c as Ki,e as vt,f as _1,h as y1,i as v1,k as B1,l as Yu,m as x1,o as Ji,r as Xi,s as yi,t as vi,y as w1,z as tu}from"./chunk-HLSZVFAU.js";import{a as Qi}from"./chunk-XH4RYJ6Y.js";import{d as cu}from"./chunk-QR7L4UUP.js";import{a as I1}from"./chunk-5BL6PCNR.js";import{b as Ve}from"./chunk-G43HU5Q5.js";import{h as _e,j as Zu,k as he}from"./chunk-ZHNSZ7X2.js";import{e as b1}from"./chunk-ASBFWS7L.js";import{a as Ee,b as Be}from"./chunk-DJKI5XBW.js";import{$a as l,Ac as v,Bc as B,Ca as Hu,Cc as Ye,D as f1,Da as s1,Fa as Uu,Gb as K,Hb as w,Ib as S,Jc as gt,Kb as nt,Kc as z,Lb as ft,Lc as Xu,M as Vr,Mb as rt,Nb as b,Nc as h1,Ob as c,Pb as p,Qb as I,Rb as c1,Sb as p1,Ub as U,Xa as de,Xb as M,Yb as h,Z as ns,_a as D1,a as X,aa as rf,ac as fs,b as Se,bc as rs,bd as zt,cc as os,cd as _i,dc as Wu,dd as bt,e as F,eb as Lr,ec as Gu,fa as r1,fb as yu,g as ze,ga as Ot,gc as Qt,gd as g1,h as G,ha as Hi,hb as Ei,hc as Ku,ic as Z,ja as o1,jc as _,k as t1,ka as a1,kc as H,kd as Hr,la as x,lb as Y,lc as q,mb as Ui,mc as Bu,n as Pt,nb as vu,nc as m1,o as is,ob as l1,q as u1,qc as Te,ra as j,rb as ce,rc as Pe,sa as N,sc as Oe,tb as d1,tc as F1,ub as zr,uc as C1,v as i1,vc as Xe,w as se,wc as eu,x as n1,xc as Ju,yc as xu,za as Rr,zc as Wi}from"./chunk-U4V4ICSI.js";var Df=F(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.regexpCode=be.getEsmExportName=be.getProperty=be.safeStringify=be.stringify=be.strConcat=be.addCodeArg=be.str=be._=be.nil=be._Code=be.Name=be.IDENTIFIER=be._CodeOrName=void 0;var af=class{};be._CodeOrName=af;be.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Bi=class extends af{constructor(u){if(super(),!be.IDENTIFIER.test(u))throw new Error("CodeGen: name must be a valid identifier");this.str=u}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};be.Name=Bi;var Ht=class extends af{constructor(u){super(),this._items=typeof u=="string"?[u]:u}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let u=this._items[0];return u===""||u==='""'}get str(){var u;return(u=this._str)!==null&&u!==void 0?u:this._str=this._items.reduce((t,i)=>`${t}${i}`,"")}get names(){var u;return(u=this._names)!==null&&u!==void 0?u:this._names=this._items.reduce((t,i)=>(i instanceof Bi&&(t[i.str]=(t[i.str]||0)+1),t),{})}};be._Code=Ht;be.nil=new Ht("");function M1(e,...u){let t=[e[0]],i=0;for(;i<u.length;)ls(t,u[i]),t.push(e[++i]);return new Ht(t)}be._=M1;var Ds=new Ht("+");function j1(e,...u){let t=[sf(e[0])],i=0;for(;i<u.length;)t.push(Ds),ls(t,u[i]),t.push(Ds,sf(e[++i]));return eb(t),new Ht(t)}be.str=j1;function ls(e,u){u instanceof Ht?e.push(...u._items):u instanceof Bi?e.push(u):e.push(ib(u))}be.addCodeArg=ls;function eb(e){let u=1;for(;u<e.length-1;){if(e[u]===Ds){let t=tb(e[u-1],e[u+1]);if(t!==void 0){e.splice(u-1,3,t);continue}e[u++]="+"}u++}}function tb(e,u){if(u==='""')return e;if(e==='""')return u;if(typeof e=="string")return u instanceof Bi||e[e.length-1]!=='"'?void 0:typeof u!="string"?`${e.slice(0,-1)}${u}"`:u[0]==='"'?e.slice(0,-1)+u.slice(1):void 0;if(typeof u=="string"&&u[0]==='"'&&!(e instanceof Bi))return`"${e}${u.slice(1)}`}function ub(e,u){return u.emptyStr()?e:e.emptyStr()?u:j1`${e}${u}`}be.strConcat=ub;function ib(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:sf(Array.isArray(e)?e.join(","):e)}function nb(e){return new Ht(sf(e))}be.stringify=nb;function sf(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}be.safeStringify=sf;function fb(e){return typeof e=="string"&&be.IDENTIFIER.test(e)?new Ht(`.${e}`):M1`[${e}]`}be.getProperty=fb;function rb(e){if(typeof e=="string"&&be.IDENTIFIER.test(e))return new Ht(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}be.getEsmExportName=rb;function ob(e){return new Ht(e.toString())}be.regexpCode=ob});var ps=F(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.ValueScope=xt.ValueScopeName=xt.Scope=xt.varKinds=xt.UsedValueState=void 0;var Bt=Df(),ds=class extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}},Yr=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(Yr||(xt.UsedValueState=Yr={}));xt.varKinds={const:new Bt.Name("const"),let:new Bt.Name("let"),var:new Bt.Name("var")};var Zr=class{constructor({prefixes:u,parent:t}={}){this._names={},this._prefixes=u,this._parent=t}toName(u){return u instanceof Bt.Name?u:this.name(u)}name(u){return new Bt.Name(this._newName(u))}_newName(u){let t=this._names[u]||this._nameGroup(u);return`${u}${t.index++}`}_nameGroup(u){var t,i;if(!((i=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||i===void 0)&&i.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}};xt.Scope=Zr;var Qr=class extends Bt.Name{constructor(u,t){super(t),this.prefix=u}setValue(u,{property:t,itemIndex:i}){this.value=u,this.scopePath=(0,Bt._)`.${new Bt.Name(t)}[${i}]`}};xt.ValueScopeName=Qr;var ab=(0,Bt._)`\n`,cs=class extends Zr{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts=Se(X({},u),{_n:u.lines?ab:Bt.nil})}get(){return this._scope}name(u){return new Qr(u,this._newName(u))}value(u,t){var i;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(u),{prefix:f}=n,r=(i=t.key)!==null&&i!==void 0?i:t.ref,o=this._values[f];if(o){let D=o.get(r);if(D)return D}else o=this._values[f]=new Map;o.set(r,n);let a=this._scope[f]||(this._scope[f]=[]),s=a.length;return a[s]=t.ref,n.setValue(t,{property:f,itemIndex:s}),n}getValue(u,t){let i=this._values[u];if(i)return i.get(t)}scopeRefs(u,t=this._values){return this._reduceValues(t,i=>{if(i.scopePath===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return(0,Bt._)`${u}${i.scopePath}`})}scopeCode(u=this._values,t,i){return this._reduceValues(u,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},t,i)}_reduceValues(u,t,i={},n){let f=Bt.nil;for(let r in u){let o=u[r];if(!o)continue;let a=i[r]=i[r]||new Map;o.forEach(s=>{if(a.has(s))return;a.set(s,Yr.Started);let D=t(s);if(D){let d=this.opts.es5?xt.varKinds.var:xt.varKinds.const;f=(0,Bt._)`${f}${d} ${s} = ${D};${this.opts._n}`}else if(D=n?.(s))f=(0,Bt._)`${f}${D}${this.opts._n}`;else throw new ds(s);a.set(s,Yr.Completed)})}return f}};xt.ValueScope=cs});var ee=F(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.or=ae.and=ae.not=ae.CodeGen=ae.operators=ae.varKinds=ae.ValueScopeName=ae.ValueScope=ae.Scope=ae.Name=ae.regexpCode=ae.stringify=ae.getProperty=ae.nil=ae.strConcat=ae.str=ae._=void 0;var Fe=Df(),iu=ps(),Qu=Df();Object.defineProperty(ae,"_",{enumerable:!0,get:function(){return Qu._}});Object.defineProperty(ae,"str",{enumerable:!0,get:function(){return Qu.str}});Object.defineProperty(ae,"strConcat",{enumerable:!0,get:function(){return Qu.strConcat}});Object.defineProperty(ae,"nil",{enumerable:!0,get:function(){return Qu.nil}});Object.defineProperty(ae,"getProperty",{enumerable:!0,get:function(){return Qu.getProperty}});Object.defineProperty(ae,"stringify",{enumerable:!0,get:function(){return Qu.stringify}});Object.defineProperty(ae,"regexpCode",{enumerable:!0,get:function(){return Qu.regexpCode}});Object.defineProperty(ae,"Name",{enumerable:!0,get:function(){return Qu.Name}});var no=ps();Object.defineProperty(ae,"Scope",{enumerable:!0,get:function(){return no.Scope}});Object.defineProperty(ae,"ValueScope",{enumerable:!0,get:function(){return no.ValueScope}});Object.defineProperty(ae,"ValueScopeName",{enumerable:!0,get:function(){return no.ValueScopeName}});Object.defineProperty(ae,"varKinds",{enumerable:!0,get:function(){return no.varKinds}});ae.operators={GT:new Fe._Code(">"),GTE:new Fe._Code(">="),LT:new Fe._Code("<"),LTE:new Fe._Code("<="),EQ:new Fe._Code("==="),NEQ:new Fe._Code("!=="),NOT:new Fe._Code("!"),OR:new Fe._Code("||"),AND:new Fe._Code("&&"),ADD:new Fe._Code("+")};var wu=class{optimizeNodes(){return this}optimizeNames(u,t){return this}},ms=class extends wu{constructor(u,t,i){super(),this.varKind=u,this.name=t,this.rhs=i}render({es5:u,_n:t}){let i=u?iu.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${n};`+t}optimizeNames(u,t){if(u[this.name.str])return this.rhs&&(this.rhs=nn(this.rhs,u,t)),this}get names(){return this.rhs instanceof Fe._CodeOrName?this.rhs.names:{}}},to=class extends wu{constructor(u,t,i){super(),this.lhs=u,this.rhs=t,this.sideEffects=i}render({_n:u}){return`${this.lhs} = ${this.rhs};`+u}optimizeNames(u,t){if(!(this.lhs instanceof Fe.Name&&!u[this.lhs.str]&&!this.sideEffects))return this.rhs=nn(this.rhs,u,t),this}get names(){let u=this.lhs instanceof Fe.Name?{}:X({},this.lhs.names);return io(u,this.rhs)}},Fs=class extends to{constructor(u,t,i,n){super(u,i,n),this.op=t}render({_n:u}){return`${this.lhs} ${this.op}= ${this.rhs};`+u}},Cs=class extends wu{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`${this.label}:`+u}},hs=class extends wu{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`break${this.label?` ${this.label}`:""};`+u}},gs=class extends wu{constructor(u){super(),this.error=u}render({_n:u}){return`throw ${this.error};`+u}get names(){return this.error.names}},bs=class extends wu{constructor(u){super(),this.code=u}render({_n:u}){return`${this.code};`+u}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(u,t){return this.code=nn(this.code,u,t),this}get names(){return this.code instanceof Fe._CodeOrName?this.code.names:{}}},lf=class extends wu{constructor(u=[]){super(),this.nodes=u}render(u){return this.nodes.reduce((t,i)=>t+i.render(u),"")}optimizeNodes(){let{nodes:u}=this,t=u.length;for(;t--;){let i=u[t].optimizeNodes();Array.isArray(i)?u.splice(t,1,...i):i?u[t]=i:u.splice(t,1)}return u.length>0?this:void 0}optimizeNames(u,t){let{nodes:i}=this,n=i.length;for(;n--;){let f=i[n];f.optimizeNames(u,t)||(sb(u,f.names),i.splice(n,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((u,t)=>xi(u,t.names),{})}},Su=class extends lf{render(u){return"{"+u._n+super.render(u)+"}"+u._n}},Es=class extends lf{},_s=(()=>{class e extends Su{}return e.kind="else",e})(),eo=(()=>{class e extends Su{constructor(t,i){super(i),this.condition=t}render(t){let i=`if(${this.condition})`+super.render(t);return this.else&&(i+="else "+this.else.render(t)),i}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let i=this.else;if(i){let n=i.optimizeNodes();i=this.else=Array.isArray(n)?new _s(n):n}if(i)return t===!1?i instanceof e?i:i.nodes:this.nodes.length?this:new e(L1(t),i instanceof e?[i]:i.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,i){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,i),!!(super.optimizeNames(t,i)||this.else))return this.condition=nn(this.condition,t,i),this}get names(){let t=super.names;return io(t,this.condition),this.else&&xi(t,this.else.names),t}}return e.kind="if",e})(),fo=(()=>{class e extends Su{}return e.kind="for",e})(),ys=class extends fo{constructor(u){super(),this.iteration=u}render(u){return`for(${this.iteration})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iteration=nn(this.iteration,u,t),this}get names(){return xi(super.names,this.iteration.names)}},vs=class extends fo{constructor(u,t,i,n){super(),this.varKind=u,this.name=t,this.from=i,this.to=n}render(u){let t=u.es5?iu.varKinds.var:this.varKind,{name:i,from:n,to:f}=this;return`for(${t} ${i}=${n}; ${i}<${f}; ${i}++)`+super.render(u)}get names(){let u=io(super.names,this.from);return io(u,this.to)}},uo=class extends fo{constructor(u,t,i,n){super(),this.loop=u,this.varKind=t,this.name=i,this.iterable=n}render(u){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iterable=nn(this.iterable,u,t),this}get names(){return xi(super.names,this.iterable.names)}},N1=(()=>{class e extends Su{constructor(t,i,n){super(),this.name=t,this.args=i,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),q1=(()=>{class e extends lf{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Bs=class extends Su{render(u){let t="try"+super.render(u);return this.catch&&(t+=this.catch.render(u)),this.finally&&(t+=this.finally.render(u)),t}optimizeNodes(){var u,t;return super.optimizeNodes(),(u=this.catch)===null||u===void 0||u.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(u,t){var i,n;return super.optimizeNames(u,t),(i=this.catch)===null||i===void 0||i.optimizeNames(u,t),(n=this.finally)===null||n===void 0||n.optimizeNames(u,t),this}get names(){let u=super.names;return this.catch&&xi(u,this.catch.names),this.finally&&xi(u,this.finally.names),u}},V1=(()=>{class e extends Su{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),R1=(()=>{class e extends Su{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),xs=class{constructor(u,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Se(X({},t),{_n:t.lines?`
1
+ import{a as uu,b as Z6}from"./chunk-PAOGSB7H.js";import{a as S1}from"./chunk-CHQVUHUA.js";import{a as en,b as tn}from"./chunk-3VIG5M5R.js";import{a as T1}from"./chunk-XZR7OZ6I.js";import{a as O1}from"./chunk-I5HQA73Q.js";import{a as P1}from"./chunk-FHMZVMZK.js";import{a as of}from"./chunk-JMCN2SQV.js";import{a as A1,b as k1}from"./chunk-YXEV6KOV.js";import{a as ss}from"./chunk-LTDUXFUG.js";import{a as $1}from"./chunk-2PGR64P5.js";import{a as Ur,b as Wr,c as Gr,d as Kr,e as Jr,f as Xr,g as Yi,m as ve,n as it,o as Zi}from"./chunk-7S2SCSTB.js";import{A as as,a as E1,b as Gi,c as Ki,e as vt,f as _1,h as y1,i as v1,k as B1,l as Yu,m as x1,o as Ji,r as Xi,s as yi,t as vi,y as w1,z as tu}from"./chunk-HLSZVFAU.js";import{a as Qi}from"./chunk-DW3UVCVP.js";import{d as cu}from"./chunk-QR7L4UUP.js";import{a as I1}from"./chunk-5GPU7OWP.js";import{b as Ve}from"./chunk-3ZZZY5X3.js";import{h as _e,j as Zu,k as he}from"./chunk-737XQ2KH.js";import{e as b1}from"./chunk-ASBFWS7L.js";import{a as Ee,b as Be}from"./chunk-DJKI5XBW.js";import{$a as l,Ac as v,Bc as B,Ca as Hu,Cc as Ye,D as f1,Da as s1,Fa as Uu,Gb as K,Hb as w,Ib as S,Jc as gt,Kb as nt,Kc as z,Lb as ft,Lc as Xu,M as Vr,Mb as rt,Nb as b,Nc as h1,Ob as c,Pb as p,Qb as I,Rb as c1,Sb as p1,Ub as U,Xa as de,Xb as M,Yb as h,Z as ns,_a as D1,a as X,aa as rf,ac as fs,b as Se,bc as rs,bd as zt,cc as os,cd as _i,dc as Wu,dd as bt,e as F,eb as Lr,ec as Gu,fa as r1,fb as yu,g as ze,ga as Ot,gc as Qt,gd as g1,h as G,ha as Hi,hb as Ei,hc as Ku,ic as Z,ja as o1,jc as _,k as t1,ka as a1,kc as H,kd as Hr,la as x,lb as Y,lc as q,mb as Ui,mc as Bu,n as Pt,nb as vu,nc as m1,o as is,ob as l1,q as u1,qc as Te,ra as j,rb as ce,rc as Pe,sa as N,sc as Oe,tb as d1,tc as F1,ub as zr,uc as C1,v as i1,vc as Xe,w as se,wc as eu,x as n1,xc as Ju,yc as xu,za as Rr,zc as Wi}from"./chunk-U4V4ICSI.js";var Df=F(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.regexpCode=be.getEsmExportName=be.getProperty=be.safeStringify=be.stringify=be.strConcat=be.addCodeArg=be.str=be._=be.nil=be._Code=be.Name=be.IDENTIFIER=be._CodeOrName=void 0;var af=class{};be._CodeOrName=af;be.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Bi=class extends af{constructor(u){if(super(),!be.IDENTIFIER.test(u))throw new Error("CodeGen: name must be a valid identifier");this.str=u}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};be.Name=Bi;var Ht=class extends af{constructor(u){super(),this._items=typeof u=="string"?[u]:u}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let u=this._items[0];return u===""||u==='""'}get str(){var u;return(u=this._str)!==null&&u!==void 0?u:this._str=this._items.reduce((t,i)=>`${t}${i}`,"")}get names(){var u;return(u=this._names)!==null&&u!==void 0?u:this._names=this._items.reduce((t,i)=>(i instanceof Bi&&(t[i.str]=(t[i.str]||0)+1),t),{})}};be._Code=Ht;be.nil=new Ht("");function M1(e,...u){let t=[e[0]],i=0;for(;i<u.length;)ls(t,u[i]),t.push(e[++i]);return new Ht(t)}be._=M1;var Ds=new Ht("+");function j1(e,...u){let t=[sf(e[0])],i=0;for(;i<u.length;)t.push(Ds),ls(t,u[i]),t.push(Ds,sf(e[++i]));return eb(t),new Ht(t)}be.str=j1;function ls(e,u){u instanceof Ht?e.push(...u._items):u instanceof Bi?e.push(u):e.push(ib(u))}be.addCodeArg=ls;function eb(e){let u=1;for(;u<e.length-1;){if(e[u]===Ds){let t=tb(e[u-1],e[u+1]);if(t!==void 0){e.splice(u-1,3,t);continue}e[u++]="+"}u++}}function tb(e,u){if(u==='""')return e;if(e==='""')return u;if(typeof e=="string")return u instanceof Bi||e[e.length-1]!=='"'?void 0:typeof u!="string"?`${e.slice(0,-1)}${u}"`:u[0]==='"'?e.slice(0,-1)+u.slice(1):void 0;if(typeof u=="string"&&u[0]==='"'&&!(e instanceof Bi))return`"${e}${u.slice(1)}`}function ub(e,u){return u.emptyStr()?e:e.emptyStr()?u:j1`${e}${u}`}be.strConcat=ub;function ib(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:sf(Array.isArray(e)?e.join(","):e)}function nb(e){return new Ht(sf(e))}be.stringify=nb;function sf(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}be.safeStringify=sf;function fb(e){return typeof e=="string"&&be.IDENTIFIER.test(e)?new Ht(`.${e}`):M1`[${e}]`}be.getProperty=fb;function rb(e){if(typeof e=="string"&&be.IDENTIFIER.test(e))return new Ht(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}be.getEsmExportName=rb;function ob(e){return new Ht(e.toString())}be.regexpCode=ob});var ps=F(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.ValueScope=xt.ValueScopeName=xt.Scope=xt.varKinds=xt.UsedValueState=void 0;var Bt=Df(),ds=class extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}},Yr=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(Yr||(xt.UsedValueState=Yr={}));xt.varKinds={const:new Bt.Name("const"),let:new Bt.Name("let"),var:new Bt.Name("var")};var Zr=class{constructor({prefixes:u,parent:t}={}){this._names={},this._prefixes=u,this._parent=t}toName(u){return u instanceof Bt.Name?u:this.name(u)}name(u){return new Bt.Name(this._newName(u))}_newName(u){let t=this._names[u]||this._nameGroup(u);return`${u}${t.index++}`}_nameGroup(u){var t,i;if(!((i=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||i===void 0)&&i.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}};xt.Scope=Zr;var Qr=class extends Bt.Name{constructor(u,t){super(t),this.prefix=u}setValue(u,{property:t,itemIndex:i}){this.value=u,this.scopePath=(0,Bt._)`.${new Bt.Name(t)}[${i}]`}};xt.ValueScopeName=Qr;var ab=(0,Bt._)`\n`,cs=class extends Zr{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts=Se(X({},u),{_n:u.lines?ab:Bt.nil})}get(){return this._scope}name(u){return new Qr(u,this._newName(u))}value(u,t){var i;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(u),{prefix:f}=n,r=(i=t.key)!==null&&i!==void 0?i:t.ref,o=this._values[f];if(o){let D=o.get(r);if(D)return D}else o=this._values[f]=new Map;o.set(r,n);let a=this._scope[f]||(this._scope[f]=[]),s=a.length;return a[s]=t.ref,n.setValue(t,{property:f,itemIndex:s}),n}getValue(u,t){let i=this._values[u];if(i)return i.get(t)}scopeRefs(u,t=this._values){return this._reduceValues(t,i=>{if(i.scopePath===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return(0,Bt._)`${u}${i.scopePath}`})}scopeCode(u=this._values,t,i){return this._reduceValues(u,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},t,i)}_reduceValues(u,t,i={},n){let f=Bt.nil;for(let r in u){let o=u[r];if(!o)continue;let a=i[r]=i[r]||new Map;o.forEach(s=>{if(a.has(s))return;a.set(s,Yr.Started);let D=t(s);if(D){let d=this.opts.es5?xt.varKinds.var:xt.varKinds.const;f=(0,Bt._)`${f}${d} ${s} = ${D};${this.opts._n}`}else if(D=n?.(s))f=(0,Bt._)`${f}${D}${this.opts._n}`;else throw new ds(s);a.set(s,Yr.Completed)})}return f}};xt.ValueScope=cs});var ee=F(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.or=ae.and=ae.not=ae.CodeGen=ae.operators=ae.varKinds=ae.ValueScopeName=ae.ValueScope=ae.Scope=ae.Name=ae.regexpCode=ae.stringify=ae.getProperty=ae.nil=ae.strConcat=ae.str=ae._=void 0;var Fe=Df(),iu=ps(),Qu=Df();Object.defineProperty(ae,"_",{enumerable:!0,get:function(){return Qu._}});Object.defineProperty(ae,"str",{enumerable:!0,get:function(){return Qu.str}});Object.defineProperty(ae,"strConcat",{enumerable:!0,get:function(){return Qu.strConcat}});Object.defineProperty(ae,"nil",{enumerable:!0,get:function(){return Qu.nil}});Object.defineProperty(ae,"getProperty",{enumerable:!0,get:function(){return Qu.getProperty}});Object.defineProperty(ae,"stringify",{enumerable:!0,get:function(){return Qu.stringify}});Object.defineProperty(ae,"regexpCode",{enumerable:!0,get:function(){return Qu.regexpCode}});Object.defineProperty(ae,"Name",{enumerable:!0,get:function(){return Qu.Name}});var no=ps();Object.defineProperty(ae,"Scope",{enumerable:!0,get:function(){return no.Scope}});Object.defineProperty(ae,"ValueScope",{enumerable:!0,get:function(){return no.ValueScope}});Object.defineProperty(ae,"ValueScopeName",{enumerable:!0,get:function(){return no.ValueScopeName}});Object.defineProperty(ae,"varKinds",{enumerable:!0,get:function(){return no.varKinds}});ae.operators={GT:new Fe._Code(">"),GTE:new Fe._Code(">="),LT:new Fe._Code("<"),LTE:new Fe._Code("<="),EQ:new Fe._Code("==="),NEQ:new Fe._Code("!=="),NOT:new Fe._Code("!"),OR:new Fe._Code("||"),AND:new Fe._Code("&&"),ADD:new Fe._Code("+")};var wu=class{optimizeNodes(){return this}optimizeNames(u,t){return this}},ms=class extends wu{constructor(u,t,i){super(),this.varKind=u,this.name=t,this.rhs=i}render({es5:u,_n:t}){let i=u?iu.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${n};`+t}optimizeNames(u,t){if(u[this.name.str])return this.rhs&&(this.rhs=nn(this.rhs,u,t)),this}get names(){return this.rhs instanceof Fe._CodeOrName?this.rhs.names:{}}},to=class extends wu{constructor(u,t,i){super(),this.lhs=u,this.rhs=t,this.sideEffects=i}render({_n:u}){return`${this.lhs} = ${this.rhs};`+u}optimizeNames(u,t){if(!(this.lhs instanceof Fe.Name&&!u[this.lhs.str]&&!this.sideEffects))return this.rhs=nn(this.rhs,u,t),this}get names(){let u=this.lhs instanceof Fe.Name?{}:X({},this.lhs.names);return io(u,this.rhs)}},Fs=class extends to{constructor(u,t,i,n){super(u,i,n),this.op=t}render({_n:u}){return`${this.lhs} ${this.op}= ${this.rhs};`+u}},Cs=class extends wu{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`${this.label}:`+u}},hs=class extends wu{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`break${this.label?` ${this.label}`:""};`+u}},gs=class extends wu{constructor(u){super(),this.error=u}render({_n:u}){return`throw ${this.error};`+u}get names(){return this.error.names}},bs=class extends wu{constructor(u){super(),this.code=u}render({_n:u}){return`${this.code};`+u}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(u,t){return this.code=nn(this.code,u,t),this}get names(){return this.code instanceof Fe._CodeOrName?this.code.names:{}}},lf=class extends wu{constructor(u=[]){super(),this.nodes=u}render(u){return this.nodes.reduce((t,i)=>t+i.render(u),"")}optimizeNodes(){let{nodes:u}=this,t=u.length;for(;t--;){let i=u[t].optimizeNodes();Array.isArray(i)?u.splice(t,1,...i):i?u[t]=i:u.splice(t,1)}return u.length>0?this:void 0}optimizeNames(u,t){let{nodes:i}=this,n=i.length;for(;n--;){let f=i[n];f.optimizeNames(u,t)||(sb(u,f.names),i.splice(n,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((u,t)=>xi(u,t.names),{})}},Su=class extends lf{render(u){return"{"+u._n+super.render(u)+"}"+u._n}},Es=class extends lf{},_s=(()=>{class e extends Su{}return e.kind="else",e})(),eo=(()=>{class e extends Su{constructor(t,i){super(i),this.condition=t}render(t){let i=`if(${this.condition})`+super.render(t);return this.else&&(i+="else "+this.else.render(t)),i}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let i=this.else;if(i){let n=i.optimizeNodes();i=this.else=Array.isArray(n)?new _s(n):n}if(i)return t===!1?i instanceof e?i:i.nodes:this.nodes.length?this:new e(L1(t),i instanceof e?[i]:i.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,i){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,i),!!(super.optimizeNames(t,i)||this.else))return this.condition=nn(this.condition,t,i),this}get names(){let t=super.names;return io(t,this.condition),this.else&&xi(t,this.else.names),t}}return e.kind="if",e})(),fo=(()=>{class e extends Su{}return e.kind="for",e})(),ys=class extends fo{constructor(u){super(),this.iteration=u}render(u){return`for(${this.iteration})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iteration=nn(this.iteration,u,t),this}get names(){return xi(super.names,this.iteration.names)}},vs=class extends fo{constructor(u,t,i,n){super(),this.varKind=u,this.name=t,this.from=i,this.to=n}render(u){let t=u.es5?iu.varKinds.var:this.varKind,{name:i,from:n,to:f}=this;return`for(${t} ${i}=${n}; ${i}<${f}; ${i}++)`+super.render(u)}get names(){let u=io(super.names,this.from);return io(u,this.to)}},uo=class extends fo{constructor(u,t,i,n){super(),this.loop=u,this.varKind=t,this.name=i,this.iterable=n}render(u){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iterable=nn(this.iterable,u,t),this}get names(){return xi(super.names,this.iterable.names)}},N1=(()=>{class e extends Su{constructor(t,i,n){super(),this.name=t,this.args=i,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),q1=(()=>{class e extends lf{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Bs=class extends Su{render(u){let t="try"+super.render(u);return this.catch&&(t+=this.catch.render(u)),this.finally&&(t+=this.finally.render(u)),t}optimizeNodes(){var u,t;return super.optimizeNodes(),(u=this.catch)===null||u===void 0||u.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(u,t){var i,n;return super.optimizeNames(u,t),(i=this.catch)===null||i===void 0||i.optimizeNames(u,t),(n=this.finally)===null||n===void 0||n.optimizeNames(u,t),this}get names(){let u=super.names;return this.catch&&xi(u,this.catch.names),this.finally&&xi(u,this.finally.names),u}},V1=(()=>{class e extends Su{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),R1=(()=>{class e extends Su{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),xs=class{constructor(u,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Se(X({},t),{_n:t.lines?`
2
2
  `:""}),this._extScope=u,this._scope=new iu.Scope({parent:u}),this._nodes=[new Es]}toString(){return this._root.render(this.opts)}name(u){return this._scope.name(u)}scopeName(u){return this._extScope.name(u)}scopeValue(u,t){let i=this._extScope.value(u,t);return(this._values[i.prefix]||(this._values[i.prefix]=new Set)).add(i),i}getScopeValue(u,t){return this._extScope.getValue(u,t)}scopeRefs(u){return this._extScope.scopeRefs(u,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(u,t,i,n){let f=this._scope.toName(t);return i!==void 0&&n&&(this._constants[f.str]=i),this._leafNode(new ms(u,f,i)),f}const(u,t,i){return this._def(iu.varKinds.const,u,t,i)}let(u,t,i){return this._def(iu.varKinds.let,u,t,i)}var(u,t,i){return this._def(iu.varKinds.var,u,t,i)}assign(u,t,i){return this._leafNode(new to(u,t,i))}add(u,t){return this._leafNode(new Fs(u,ae.operators.ADD,t))}code(u){return typeof u=="function"?u():u!==Fe.nil&&this._leafNode(new bs(u)),this}object(...u){let t=["{"];for(let[i,n]of u)t.length>1&&t.push(","),t.push(i),(i!==n||this.opts.es5)&&(t.push(":"),(0,Fe.addCodeArg)(t,n));return t.push("}"),new Fe._Code(t)}if(u,t,i){if(this._blockNode(new eo(u)),t&&i)this.code(t).else().code(i).endIf();else if(t)this.code(t).endIf();else if(i)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(u){return this._elseNode(new eo(u))}else(){return this._elseNode(new _s)}endIf(){return this._endBlockNode(eo,_s)}_for(u,t){return this._blockNode(u),t&&this.code(t).endFor(),this}for(u,t){return this._for(new ys(u),t)}forRange(u,t,i,n,f=this.opts.es5?iu.varKinds.var:iu.varKinds.let){let r=this._scope.toName(u);return this._for(new vs(f,r,t,i),()=>n(r))}forOf(u,t,i,n=iu.varKinds.const){let f=this._scope.toName(u);if(this.opts.es5){let r=t instanceof Fe.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,Fe._)`${r}.length`,o=>{this.var(f,(0,Fe._)`${r}[${o}]`),i(f)})}return this._for(new uo("of",n,f,t),()=>i(f))}forIn(u,t,i,n=this.opts.es5?iu.varKinds.var:iu.varKinds.const){if(this.opts.ownProperties)return this.forOf(u,(0,Fe._)`Object.keys(${t})`,i);let f=this._scope.toName(u);return this._for(new uo("in",n,f,t),()=>i(f))}endFor(){return this._endBlockNode(fo)}label(u){return this._leafNode(new Cs(u))}break(u){return this._leafNode(new hs(u))}return(u){let t=new q1;if(this._blockNode(t),this.code(u),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(q1)}try(u,t,i){if(!t&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new Bs;if(this._blockNode(n),this.code(u),t){let f=this.name("e");this._currNode=n.catch=new V1(f),t(f)}return i&&(this._currNode=n.finally=new R1,this.code(i)),this._endBlockNode(V1,R1)}throw(u){return this._leafNode(new gs(u))}block(u,t){return this._blockStarts.push(this._nodes.length),u&&this.code(u).endBlock(t),this}endBlock(u){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let i=this._nodes.length-t;if(i<0||u!==void 0&&i!==u)throw new Error(`CodeGen: wrong number of nodes: ${i} vs ${u} expected`);return this._nodes.length=t,this}func(u,t=Fe.nil,i,n){return this._blockNode(new N1(u,t,i)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(N1)}optimize(u=1){for(;u-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(u){return this._currNode.nodes.push(u),this}_blockNode(u){this._currNode.nodes.push(u),this._nodes.push(u)}_endBlockNode(u,t){let i=this._currNode;if(i instanceof u||t&&i instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${u.kind}/${t.kind}`:u.kind}"`)}_elseNode(u){let t=this._currNode;if(!(t instanceof eo))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=u,this}get _root(){return this._nodes[0]}get _currNode(){let u=this._nodes;return u[u.length-1]}set _currNode(u){let t=this._nodes;t[t.length-1]=u}};ae.CodeGen=xs;function xi(e,u){for(let t in u)e[t]=(e[t]||0)+(u[t]||0);return e}function io(e,u){return u instanceof Fe._CodeOrName?xi(e,u.names):e}function nn(e,u,t){if(e instanceof Fe.Name)return i(e);if(!n(e))return e;return new Fe._Code(e._items.reduce((f,r)=>(r instanceof Fe.Name&&(r=i(r)),r instanceof Fe._Code?f.push(...r._items):f.push(r),f),[]));function i(f){let r=t[f.str];return r===void 0||u[f.str]!==1?f:(delete u[f.str],r)}function n(f){return f instanceof Fe._Code&&f._items.some(r=>r instanceof Fe.Name&&u[r.str]===1&&t[r.str]!==void 0)}}function sb(e,u){for(let t in u)e[t]=(e[t]||0)-(u[t]||0)}function L1(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,Fe._)`!${ws(e)}`}ae.not=L1;var Db=z1(ae.operators.AND);function lb(...e){return e.reduce(Db)}ae.and=lb;var db=z1(ae.operators.OR);function cb(...e){return e.reduce(db)}ae.or=cb;function z1(e){return(u,t)=>u===Fe.nil?t:t===Fe.nil?u:(0,Fe._)`${ws(u)} ${e} ${ws(t)}`}function ws(e){return e instanceof Fe.Name?e:(0,Fe._)`(${e})`}});var le=F(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.checkStrictMode=De.getErrorPath=De.Type=De.useFunc=De.setEvaluated=De.evaluatedPropsToName=De.mergeEvaluated=De.eachItem=De.unescapeJsonPointer=De.escapeJsonPointer=De.escapeFragment=De.unescapeFragment=De.schemaRefOrVal=De.schemaHasRulesButRef=De.schemaHasRules=De.checkUnknownRules=De.alwaysValidSchema=De.toHash=void 0;var Ie=ee(),pb=Df();function mb(e){let u={};for(let t of e)u[t]=!0;return u}De.toHash=mb;function Fb(e,u){return typeof u=="boolean"?u:Object.keys(u).length===0?!0:(W1(e,u),!G1(u,e.self.RULES.all))}De.alwaysValidSchema=Fb;function W1(e,u=e.schema){let{opts:t,self:i}=e;if(!t.strictSchema||typeof u=="boolean")return;let n=i.RULES.keywords;for(let f in u)n[f]||X1(e,`unknown keyword: "${f}"`)}De.checkUnknownRules=W1;function G1(e,u){if(typeof e=="boolean")return!e;for(let t in e)if(u[t])return!0;return!1}De.schemaHasRules=G1;function Cb(e,u){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&u.all[t])return!0;return!1}De.schemaHasRulesButRef=Cb;function hb({topSchemaRef:e,schemaPath:u},t,i,n){if(!n){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,Ie._)`${t}`}return(0,Ie._)`${e}${u}${(0,Ie.getProperty)(i)}`}De.schemaRefOrVal=hb;function gb(e){return K1(decodeURIComponent(e))}De.unescapeFragment=gb;function bb(e){return encodeURIComponent(Is(e))}De.escapeFragment=bb;function Is(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}De.escapeJsonPointer=Is;function K1(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}De.unescapeJsonPointer=K1;function Eb(e,u){if(Array.isArray(e))for(let t of e)u(t);else u(e)}De.eachItem=Eb;function H1({mergeNames:e,mergeToName:u,mergeValues:t,resultToName:i}){return(n,f,r,o)=>{let a=r===void 0?f:r instanceof Ie.Name?(f instanceof Ie.Name?e(n,f,r):u(n,f,r),r):f instanceof Ie.Name?(u(n,r,f),f):t(f,r);return o===Ie.Name&&!(a instanceof Ie.Name)?i(n,a):a}}De.mergeEvaluated={props:H1({mergeNames:(e,u,t)=>e.if((0,Ie._)`${t} !== true && ${u} !== undefined`,()=>{e.if((0,Ie._)`${u} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,Ie._)`${t} || {}`).code((0,Ie._)`Object.assign(${t}, ${u})`))}),mergeToName:(e,u,t)=>e.if((0,Ie._)`${t} !== true`,()=>{u===!0?e.assign(t,!0):(e.assign(t,(0,Ie._)`${t} || {}`),As(e,t,u))}),mergeValues:(e,u)=>e===!0?!0:X(X({},e),u),resultToName:J1}),items:H1({mergeNames:(e,u,t)=>e.if((0,Ie._)`${t} !== true && ${u} !== undefined`,()=>e.assign(t,(0,Ie._)`${u} === true ? true : ${t} > ${u} ? ${t} : ${u}`)),mergeToName:(e,u,t)=>e.if((0,Ie._)`${t} !== true`,()=>e.assign(t,u===!0?!0:(0,Ie._)`${t} > ${u} ? ${t} : ${u}`)),mergeValues:(e,u)=>e===!0?!0:Math.max(e,u),resultToName:(e,u)=>e.var("items",u)})};function J1(e,u){if(u===!0)return e.var("props",!0);let t=e.var("props",(0,Ie._)`{}`);return u!==void 0&&As(e,t,u),t}De.evaluatedPropsToName=J1;function As(e,u,t){Object.keys(t).forEach(i=>e.assign((0,Ie._)`${u}${(0,Ie.getProperty)(i)}`,!0))}De.setEvaluated=As;var U1={};function _b(e,u){return e.scopeValue("func",{ref:u,code:U1[u.code]||(U1[u.code]=new pb._Code(u.code))})}De.useFunc=_b;var Ss=function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e}(Ss||(De.Type=Ss={}));function yb(e,u,t){if(e instanceof Ie.Name){let i=u===Ss.Num;return t?i?(0,Ie._)`"[" + ${e} + "]"`:(0,Ie._)`"['" + ${e} + "']"`:i?(0,Ie._)`"/" + ${e}`:(0,Ie._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,Ie.getProperty)(e).toString():"/"+Is(e)}De.getErrorPath=yb;function X1(e,u,t=e.opts.strictSchema){if(t){if(u=`strict mode: ${u}`,t===!0)throw new Error(u);e.self.logger.warn(u)}}De.checkStrictMode=X1});var Ut=F(ks=>{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});var lt=ee(),vb={data:new lt.Name("data"),valCxt:new lt.Name("valCxt"),instancePath:new lt.Name("instancePath"),parentData:new lt.Name("parentData"),parentDataProperty:new lt.Name("parentDataProperty"),rootData:new lt.Name("rootData"),dynamicAnchors:new lt.Name("dynamicAnchors"),vErrors:new lt.Name("vErrors"),errors:new lt.Name("errors"),this:new lt.Name("this"),self:new lt.Name("self"),scope:new lt.Name("scope"),json:new lt.Name("json"),jsonPos:new lt.Name("jsonPos"),jsonLen:new lt.Name("jsonLen"),jsonPart:new lt.Name("jsonPart")};ks.default=vb});var df=F(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.extendErrors=dt.resetErrorsCount=dt.reportExtraError=dt.reportError=dt.keyword$DataError=dt.keywordError=void 0;var ge=ee(),ro=le(),Et=Ut();dt.keywordError={message:({keyword:e})=>(0,ge.str)`must pass "${e}" keyword validation`};dt.keyword$DataError={message:({keyword:e,schemaType:u})=>u?(0,ge.str)`"${e}" keyword must be ${u} ($data)`:(0,ge.str)`"${e}" keyword is invalid ($data)`};function Bb(e,u=dt.keywordError,t,i){let{it:n}=e,{gen:f,compositeRule:r,allErrors:o}=n,a=Q1(e,u,t);i??(r||o)?Y1(f,a):Z1(n,(0,ge._)`[${a}]`)}dt.reportError=Bb;function xb(e,u=dt.keywordError,t){let{it:i}=e,{gen:n,compositeRule:f,allErrors:r}=i,o=Q1(e,u,t);Y1(n,o),f||r||Z1(i,Et.default.vErrors)}dt.reportExtraError=xb;function wb(e,u){e.assign(Et.default.errors,u),e.if((0,ge._)`${Et.default.vErrors} !== null`,()=>e.if(u,()=>e.assign((0,ge._)`${Et.default.vErrors}.length`,u),()=>e.assign(Et.default.vErrors,null)))}dt.resetErrorsCount=wb;function Sb({gen:e,keyword:u,schemaValue:t,data:i,errsCount:n,it:f}){if(n===void 0)throw new Error("ajv implementation error");let r=e.name("err");e.forRange("i",n,Et.default.errors,o=>{e.const(r,(0,ge._)`${Et.default.vErrors}[${o}]`),e.if((0,ge._)`${r}.instancePath === undefined`,()=>e.assign((0,ge._)`${r}.instancePath`,(0,ge.strConcat)(Et.default.instancePath,f.errorPath))),e.assign((0,ge._)`${r}.schemaPath`,(0,ge.str)`${f.errSchemaPath}/${u}`),f.opts.verbose&&(e.assign((0,ge._)`${r}.schema`,t),e.assign((0,ge._)`${r}.data`,i))})}dt.extendErrors=Sb;function Y1(e,u){let t=e.const("err",u);e.if((0,ge._)`${Et.default.vErrors} === null`,()=>e.assign(Et.default.vErrors,(0,ge._)`[${t}]`),(0,ge._)`${Et.default.vErrors}.push(${t})`),e.code((0,ge._)`${Et.default.errors}++`)}function Z1(e,u){let{gen:t,validateName:i,schemaEnv:n}=e;n.$async?t.throw((0,ge._)`new ${e.ValidationError}(${u})`):(t.assign((0,ge._)`${i}.errors`,u),t.return(!1))}var wi={keyword:new ge.Name("keyword"),schemaPath:new ge.Name("schemaPath"),params:new ge.Name("params"),propertyName:new ge.Name("propertyName"),message:new ge.Name("message"),schema:new ge.Name("schema"),parentSchema:new ge.Name("parentSchema")};function Q1(e,u,t){let{createErrors:i}=e.it;return i===!1?(0,ge._)`{}`:Ib(e,u,t)}function Ib(e,u,t={}){let{gen:i,it:n}=e,f=[Ab(n,t),kb(e,t)];return $b(e,u,f),i.object(...f)}function Ab({errorPath:e},{instancePath:u}){let t=u?(0,ge.str)`${e}${(0,ro.getErrorPath)(u,ro.Type.Str)}`:e;return[Et.default.instancePath,(0,ge.strConcat)(Et.default.instancePath,t)]}function kb({keyword:e,it:{errSchemaPath:u}},{schemaPath:t,parentSchema:i}){let n=i?u:(0,ge.str)`${u}/${e}`;return t&&(n=(0,ge.str)`${n}${(0,ro.getErrorPath)(t,ro.Type.Str)}`),[wi.schemaPath,n]}function $b(e,{params:u,message:t},i){let{keyword:n,data:f,schemaValue:r,it:o}=e,{opts:a,propertyName:s,topSchemaRef:D,schemaPath:d}=o;i.push([wi.keyword,n],[wi.params,typeof u=="function"?u(e):u||(0,ge._)`{}`]),a.messages&&i.push([wi.message,typeof t=="function"?t(e):t]),a.verbose&&i.push([wi.schema,r],[wi.parentSchema,(0,ge._)`${D}${d}`],[Et.default.data,f]),s&&i.push([wi.propertyName,s])}});var td=F(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.boolOrEmptySchema=fn.topBoolOrEmptySchema=void 0;var Tb=df(),Pb=ee(),Ob=Ut(),Mb={message:"boolean schema is false"};function jb(e){let{gen:u,schema:t,validateName:i}=e;t===!1?ed(e,!1):typeof t=="object"&&t.$async===!0?u.return(Ob.default.data):(u.assign((0,Pb._)`${i}.errors`,null),u.return(!0))}fn.topBoolOrEmptySchema=jb;function Nb(e,u){let{gen:t,schema:i}=e;i===!1?(t.var(u,!1),ed(e)):t.var(u,!0)}fn.boolOrEmptySchema=Nb;function ed(e,u){let{gen:t,data:i}=e,n={gen:t,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,Tb.reportError)(n,Mb,void 0,u)}});var $s=F(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.getRules=rn.isJSONType=void 0;var qb=["string","number","integer","boolean","null","object","array"],Vb=new Set(qb);function Rb(e){return typeof e=="string"&&Vb.has(e)}rn.isJSONType=Rb;function Lb(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Se(X({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}rn.getRules=Lb});var Ts=F(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.shouldUseRule=ei.shouldUseGroup=ei.schemaHasRulesForType=void 0;function zb({schema:e,self:u},t){let i=u.RULES.types[t];return i&&i!==!0&&ud(e,i)}ei.schemaHasRulesForType=zb;function ud(e,u){return u.rules.some(t=>id(e,t))}ei.shouldUseGroup=ud;function id(e,u){var t;return e[u.keyword]!==void 0||((t=u.definition.implements)===null||t===void 0?void 0:t.some(i=>e[i]!==void 0))}ei.shouldUseRule=id});var cf=F(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.reportTypeError=ct.checkDataTypes=ct.checkDataType=ct.coerceAndCheckDataType=ct.getJSONTypes=ct.getSchemaTypes=ct.DataType=void 0;var Hb=$s(),Ub=Ts(),Wb=df(),re=ee(),nd=le(),on=function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e}(on||(ct.DataType=on={}));function Gb(e){let u=fd(e.type);if(u.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!u.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&u.push("null")}return u}ct.getSchemaTypes=Gb;function fd(e){let u=Array.isArray(e)?e:e?[e]:[];if(u.every(Hb.isJSONType))return u;throw new Error("type must be JSONType or JSONType[]: "+u.join(","))}ct.getJSONTypes=fd;function Kb(e,u){let{gen:t,data:i,opts:n}=e,f=Jb(u,n.coerceTypes),r=u.length>0&&!(f.length===0&&u.length===1&&(0,Ub.schemaHasRulesForType)(e,u[0]));if(r){let o=Os(u,i,n.strictNumbers,on.Wrong);t.if(o,()=>{f.length?Xb(e,u,f):Ms(e)})}return r}ct.coerceAndCheckDataType=Kb;var rd=new Set(["string","number","integer","boolean","null"]);function Jb(e,u){return u?e.filter(t=>rd.has(t)||u==="array"&&t==="array"):[]}function Xb(e,u,t){let{gen:i,data:n,opts:f}=e,r=i.let("dataType",(0,re._)`typeof ${n}`),o=i.let("coerced",(0,re._)`undefined`);f.coerceTypes==="array"&&i.if((0,re._)`${r} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>i.assign(n,(0,re._)`${n}[0]`).assign(r,(0,re._)`typeof ${n}`).if(Os(u,n,f.strictNumbers),()=>i.assign(o,n))),i.if((0,re._)`${o} !== undefined`);for(let s of t)(rd.has(s)||s==="array"&&f.coerceTypes==="array")&&a(s);i.else(),Ms(e),i.endIf(),i.if((0,re._)`${o} !== undefined`,()=>{i.assign(n,o),Yb(e,o)});function a(s){switch(s){case"string":i.elseIf((0,re._)`${r} == "number" || ${r} == "boolean"`).assign(o,(0,re._)`"" + ${n}`).elseIf((0,re._)`${n} === null`).assign(o,(0,re._)`""`);return;case"number":i.elseIf((0,re._)`${r} == "boolean" || ${n} === null
3
3
  || (${r} == "string" && ${n} && ${n} == +${n})`).assign(o,(0,re._)`+${n}`);return;case"integer":i.elseIf((0,re._)`${r} === "boolean" || ${n} === null
4
4
  || (${r} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(o,(0,re._)`+${n}`);return;case"boolean":i.elseIf((0,re._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(o,!1).elseIf((0,re._)`${n} === "true" || ${n} === 1`).assign(o,!0);return;case"null":i.elseIf((0,re._)`${n} === "" || ${n} === 0 || ${n} === false`),i.assign(o,null);return;case"array":i.elseIf((0,re._)`${r} === "string" || ${r} === "number"
@@ -0,0 +1 @@
1
+ import{e as a}from"./chunk-QLIPWIAB.js";import"./chunk-FHMZVMZK.js";import"./chunk-7S2SCSTB.js";import"./chunk-HLSZVFAU.js";import"./chunk-QR7L4UUP.js";import"./chunk-5GPU7OWP.js";import"./chunk-3ZZZY5X3.js";import"./chunk-737XQ2KH.js";import"./chunk-ASBFWS7L.js";import"./chunk-DJKI5XBW.js";import"./chunk-U4V4ICSI.js";export{a as UsersComponent};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-LMKNFAMR.js";import"./chunk-3GULJZHP.js";import"./chunk-4XCUHCZU.js";import"./chunk-D2Y3VAXH.js";import"./chunk-PAOGSB7H.js";import"./chunk-CHQVUHUA.js";import"./chunk-3VIG5M5R.js";import"./chunk-XZR7OZ6I.js";import"./chunk-I5HQA73Q.js";import"./chunk-Q7VA22QV.js";import"./chunk-FHMZVMZK.js";import"./chunk-JMCN2SQV.js";import"./chunk-YXEV6KOV.js";import"./chunk-UH63AXBP.js";import"./chunk-LTDUXFUG.js";import"./chunk-2PGR64P5.js";import"./chunk-7S2SCSTB.js";import"./chunk-HLSZVFAU.js";import"./chunk-DW3UVCVP.js";import"./chunk-QR7L4UUP.js";import"./chunk-5GPU7OWP.js";import"./chunk-3ZZZY5X3.js";import"./chunk-737XQ2KH.js";import"./chunk-ASBFWS7L.js";import"./chunk-DJKI5XBW.js";import"./chunk-U4V4ICSI.js";export{a as PluginsComponent};