homebridge-config-ui-x 5.4.2-beta.29 → 5.4.2-beta.30

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 (58) hide show
  1. package/dist/main.js +2 -2
  2. package/dist/main.js.map +1 -1
  3. package/package.json +1 -1
  4. package/public/{chunk-WDE5OXOY.js → chunk-253ZBDHH.js} +1 -1
  5. package/public/{chunk-HO6C3ZNS.js → chunk-2IPQZLVN.js} +1 -1
  6. package/public/{chunk-3OFFDT3E.js → chunk-4HVAHSRF.js} +1 -1
  7. package/public/{chunk-3BBGBKFR.js → chunk-5Z4FTMML.js} +1 -1
  8. package/public/{chunk-WZBU3SBS.js → chunk-65HQOP36.js} +1 -1
  9. package/public/{chunk-QDN5XMMB.js → chunk-6PHHQ6IM.js} +1 -1
  10. package/public/{chunk-74TLD7UE.js → chunk-6TQFT6P4.js} +1 -1
  11. package/public/{chunk-4VGD3WI7.js → chunk-7VHLSUED.js} +1 -1
  12. package/public/{chunk-AHD4KF6Z.js → chunk-ABEVX6CB.js} +1 -1
  13. package/public/{chunk-TES6RTPW.js → chunk-AW4QFYCR.js} +1 -1
  14. package/public/{chunk-VQGEOKAU.js → chunk-C5326JMO.js} +1 -1
  15. package/public/{chunk-JY7WBI77.js → chunk-C7QDL5WP.js} +1 -1
  16. package/public/{chunk-GIE4TMN3.js → chunk-C7TPBYIB.js} +1 -1
  17. package/public/{chunk-MCA223NA.js → chunk-CDAIJVOO.js} +1 -1
  18. package/public/{chunk-4NGXWZXZ.js → chunk-D6XKSCC5.js} +1 -1
  19. package/public/{chunk-A45G2U3K.js → chunk-DS4O3BGO.js} +1 -1
  20. package/public/{chunk-SHZB7AIZ.js → chunk-FVAPYJL7.js} +1 -1
  21. package/public/{chunk-MCFOWF4A.js → chunk-GF7XNWKJ.js} +1 -1
  22. package/public/{chunk-DCNSZOAX.js → chunk-GWH3BEV7.js} +1 -1
  23. package/public/{chunk-AP6Z5Y4X.js → chunk-I7RCBEV6.js} +1 -1
  24. package/public/{chunk-B5QBG6FX.js → chunk-IF3EEVBI.js} +1 -1
  25. package/public/{chunk-BD4L4MMU.js → chunk-IOCF6PSL.js} +1 -1
  26. package/public/{chunk-GP2GNSMH.js → chunk-JOEJHDAU.js} +1 -1
  27. package/public/{chunk-R3RKTCAQ.js → chunk-JUER5JSF.js} +1 -1
  28. package/public/chunk-K6X3V7QM.js +1 -0
  29. package/public/{chunk-7KLW5GIG.js → chunk-KWFXAMYZ.js} +1 -1
  30. package/public/{chunk-GH4JGNJN.js → chunk-KWZSOR47.js} +1 -1
  31. package/public/{chunk-NQOKXOSJ.js → chunk-L4SN7UV7.js} +1 -1
  32. package/public/{chunk-3WOR7HY4.js → chunk-LW3OSTQ2.js} +1 -1
  33. package/public/{chunk-LQZNIDZL.js → chunk-MAKP7ITV.js} +1 -1
  34. package/public/{chunk-7CFZRR4O.js → chunk-MX2XN5AC.js} +1 -1
  35. package/public/{chunk-X7HR3QMP.js → chunk-NA2TYL3P.js} +1 -1
  36. package/public/{chunk-NPZOV2X7.js → chunk-NKLS6I3Q.js} +1 -1
  37. package/public/{chunk-BOE57LT5.js → chunk-OTQDUUVB.js} +1 -1
  38. package/public/{chunk-JR2FLREK.js → chunk-OXWDSC64.js} +1 -1
  39. package/public/{chunk-A3VTDTFF.js → chunk-OZU3RJB3.js} +1 -1
  40. package/public/{chunk-ZLL7JTA4.js → chunk-PF42ZW6U.js} +1 -1
  41. package/public/{chunk-NZX64JHS.js → chunk-Q32MRVAW.js} +2 -2
  42. package/public/{chunk-5XL6YEVR.js → chunk-QAF5FFZX.js} +1 -1
  43. package/public/{chunk-CX6JKA5M.js → chunk-QGV5APZY.js} +1 -1
  44. package/public/{chunk-53UVZ2PI.js → chunk-R4YZWKPJ.js} +1 -1
  45. package/public/{chunk-RPAP36X2.js → chunk-RCDQIPR6.js} +1 -1
  46. package/public/{chunk-2D7HQVKR.js → chunk-RJECYPFA.js} +1 -1
  47. package/public/{chunk-Z5TUCCAE.js → chunk-TNLA3VFN.js} +1 -1
  48. package/public/{chunk-LTBNWBMR.js → chunk-TRJG3WAE.js} +1 -1
  49. package/public/{chunk-YHSF3BIL.js → chunk-TWO6DCLR.js} +1 -1
  50. package/public/{chunk-3PZPX5LT.js → chunk-UVDUQESK.js} +1 -1
  51. package/public/{chunk-QFVLYN66.js → chunk-VOCSPCZB.js} +1 -1
  52. package/public/{chunk-SDNFT4EO.js → chunk-VZV2F4H3.js} +1 -1
  53. package/public/{chunk-CUOS2FWX.js → chunk-XK7QF23T.js} +1 -1
  54. package/public/{chunk-HPUVHUIE.js → chunk-Y6PTF4YJ.js} +1 -1
  55. package/public/{chunk-FP4B5ZM4.js → chunk-YR5AVFAB.js} +1 -1
  56. package/public/index.html +1 -1
  57. package/public/{main-B7UGKBVJ.js → main-SHSVLBYV.js} +1 -1
  58. package/public/chunk-KLRMJTX4.js +0 -1
@@ -1 +1 @@
1
- import{a as n}from"./chunk-SDNFT4EO.js";import{g as i}from"./chunk-YMAWYUA6.js";import"./chunk-HPUVHUIE.js";import"./chunk-7KLW5GIG.js";import{Xa as r,fa as o}from"./chunk-V2XN5VIX.js";var a=[{path:"",loadComponent:()=>import("./chunk-NQOKXOSJ.js").then(t=>t.SetupWizardComponent)}],u=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({imports:[i.forChild(a),i]})}return t})();var l=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({providers:[n],imports:[u]})}return t})();export{l as SetupWizardModule};
1
+ import{a as n}from"./chunk-VZV2F4H3.js";import{g as i}from"./chunk-YMAWYUA6.js";import"./chunk-Y6PTF4YJ.js";import"./chunk-KWFXAMYZ.js";import{Xa as r,fa as o}from"./chunk-V2XN5VIX.js";var a=[{path:"",loadComponent:()=>import("./chunk-L4SN7UV7.js").then(t=>t.SetupWizardComponent)}],u=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({imports:[i.forChild(a),i]})}return t})();var l=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({providers:[n],imports:[u]})}return t})();export{l as SetupWizardModule};
@@ -1 +1 @@
1
- import{a as u}from"./chunk-KT4VIVBF.js";import{k as c,n as p,q as m}from"./chunk-7KLW5GIG.js";import{ea as n,g as f,h as r,ja as a,w as s}from"./chunk-V2XN5VIX.js";var l=f(u(),1);var $=(()=>{class e{$api=a(m);$toastr=a(p);$translate=a(c);downloadBackup(){return r(this,null,function*(){let t=yield s(this.$api.get("/backup/download",{observe:"response",responseType:"blob"})),i=t.headers.get("File-Name")||"homebridge-backup.tar.gz",o=t.body.size;if(o>globalThis.backup.maxBackupSize){let b=this.$translate.instant("backup.backup_exceeds_max_size",{maxBackupSizeText:globalThis.backup.maxBackupSizeText,size:`${(o/1048576).toFixed(1)}MB`});this.$toastr.warning(b,this.$translate.instant("toast.title_warning"))}(0,l.saveAs)(t.body,i)})}static \u0275fac=function(i){return new(i||e)};static \u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{$ as a};
1
+ import{a as u}from"./chunk-KT4VIVBF.js";import{k as c,n as p,q as m}from"./chunk-KWFXAMYZ.js";import{ea as n,g as f,h as r,ja as a,w as s}from"./chunk-V2XN5VIX.js";var l=f(u(),1);var $=(()=>{class e{$api=a(m);$toastr=a(p);$translate=a(c);downloadBackup(){return r(this,null,function*(){let t=yield s(this.$api.get("/backup/download",{observe:"response",responseType:"blob"})),i=t.headers.get("File-Name")||"homebridge-backup.tar.gz",o=t.body.size;if(o>globalThis.backup.maxBackupSize){let b=this.$translate.instant("backup.backup_exceeds_max_size",{maxBackupSizeText:globalThis.backup.maxBackupSizeText,size:`${(o/1048576).toFixed(1)}MB`});this.$toastr.warning(b,this.$translate.instant("toast.title_warning"))}(0,l.saveAs)(t.body,i)})}static \u0275fac=function(i){return new(i||e)};static \u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{$ as a};
@@ -1 +1 @@
1
- import{a as E}from"./chunk-YHSF3BIL.js";import{a as S}from"./chunk-4NGXWZXZ.js";import"./chunk-YOAZTJFX.js";import"./chunk-JY7WBI77.js";import"./chunk-LXFVNKLD.js";import"./chunk-F7ZV2JBO.js";import"./chunk-74TLD7UE.js";import"./chunk-2D7HQVKR.js";import{b as C}from"./chunk-HPUVHUIE.js";import{l as w}from"./chunk-7KLW5GIG.js";import{Gb as v,Ka as a,La as c,Pb as f,Qb as p,Vb as g,Wa as u,Wb as T,ja as o,mc as y,n as d,nc as b,vb as m,wb as l,xb as h,xc as $}from"./chunk-V2XN5VIX.js";var _=["terminaloutput"],A=(()=>{class r{$terminal=o(S);$settings=o(C);$navigationGuard=o(E);resizeEvent=new d;termTarget=$("terminaloutput");onWindowResize(){this.resizeEvent.next(void 0)}onBeforeUnload(t){return this.$navigationGuard.handleBeforeUnload(t)}onWindowFocus(){this.activateTerminal()}onClick(){this.activateTerminal()}activateTerminal(){this.$terminal.isTerminalReady()&&this.$terminal.term&&this.$terminal.term.focus()}ngOnInit(){window.document.querySelector("body").classList.add("bg-black"),this.$terminal.isTerminalReady()&&this.$terminal.destroyTerminal(),this.$settings.env.terminal?.persistence&&this.$terminal.hasActiveSession()?this.$terminal.reconnectTerminal(this.termTarget(),{},this.resizeEvent):(!this.$settings.env.terminal?.persistence&&this.$terminal.hasActiveSession()&&this.$terminal.destroyPersistentSession(),this.$terminal.startTerminal(this.termTarget(),{},this.resizeEvent)),setTimeout(()=>{this.activateTerminal()},100)}ngAfterViewInit(){document.addEventListener("visibilitychange",this.onVisibilityChange.bind(this))}onVisibilityChange(){!document.hidden&&this.$terminal.isTerminalReady()&&setTimeout(()=>{this.activateTerminal()},100)}canDeactivate(){return this.$navigationGuard.canDeactivate()}ngOnDestroy(){document.removeEventListener("visibilitychange",this.onVisibilityChange.bind(this)),window.document.querySelector("body").classList.remove("bg-black"),this.$settings.env.terminal?.persistence?this.$terminal.detachTerminal():this.$terminal.destroyPersistentSession()}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=u({type:r,selectors:[["ng-component"]],viewQuery:function(e,i){e&1&&f(i.termTarget,_,5),e&2&&p()},hostBindings:function(e,i){e&1&&v("resize",function(n){return i.onWindowResize(n)},a)("beforeunload",function(n){return i.onBeforeUnload(n)},a)("focus",function(n){return i.onWindowFocus(n)},a)("click",function(n){return i.onClick(n)})},decls:8,vars:3,consts:[["terminaloutput",""],[1,"row","mb-3"],[1,"col-12"],[1,"primary-text","m-0"],[1,"flex-column","d-flex","align-items-stretch","adjust-for-mobile"],["id","docker-terminal",1,"align-self-end","w-100","h-100","mb-1"]],template:function(e,i){e&1&&(m(0,"div",1)(1,"div",2)(2,"h3",3),g(3),y(4,"translate"),l()()(),m(5,"div",4),h(6,"div",5,0),l()),e&2&&(c(3),T(b(4,1,"menu.linux.label_terminal")))},dependencies:[w],encapsulation:2})}return r})();export{A as TerminalComponent};
1
+ import{a as E}from"./chunk-TWO6DCLR.js";import{a as S}from"./chunk-D6XKSCC5.js";import"./chunk-YOAZTJFX.js";import"./chunk-C7QDL5WP.js";import"./chunk-LXFVNKLD.js";import"./chunk-F7ZV2JBO.js";import"./chunk-6TQFT6P4.js";import"./chunk-RJECYPFA.js";import{b as C}from"./chunk-Y6PTF4YJ.js";import{l as w}from"./chunk-KWFXAMYZ.js";import{Gb as v,Ka as a,La as c,Pb as f,Qb as p,Vb as g,Wa as u,Wb as T,ja as o,mc as y,n as d,nc as b,vb as m,wb as l,xb as h,xc as $}from"./chunk-V2XN5VIX.js";var _=["terminaloutput"],A=(()=>{class r{$terminal=o(S);$settings=o(C);$navigationGuard=o(E);resizeEvent=new d;termTarget=$("terminaloutput");onWindowResize(){this.resizeEvent.next(void 0)}onBeforeUnload(t){return this.$navigationGuard.handleBeforeUnload(t)}onWindowFocus(){this.activateTerminal()}onClick(){this.activateTerminal()}activateTerminal(){this.$terminal.isTerminalReady()&&this.$terminal.term&&this.$terminal.term.focus()}ngOnInit(){window.document.querySelector("body").classList.add("bg-black"),this.$terminal.isTerminalReady()&&this.$terminal.destroyTerminal(),this.$settings.env.terminal?.persistence&&this.$terminal.hasActiveSession()?this.$terminal.reconnectTerminal(this.termTarget(),{},this.resizeEvent):(!this.$settings.env.terminal?.persistence&&this.$terminal.hasActiveSession()&&this.$terminal.destroyPersistentSession(),this.$terminal.startTerminal(this.termTarget(),{},this.resizeEvent)),setTimeout(()=>{this.activateTerminal()},100)}ngAfterViewInit(){document.addEventListener("visibilitychange",this.onVisibilityChange.bind(this))}onVisibilityChange(){!document.hidden&&this.$terminal.isTerminalReady()&&setTimeout(()=>{this.activateTerminal()},100)}canDeactivate(){return this.$navigationGuard.canDeactivate()}ngOnDestroy(){document.removeEventListener("visibilitychange",this.onVisibilityChange.bind(this)),window.document.querySelector("body").classList.remove("bg-black"),this.$settings.env.terminal?.persistence?this.$terminal.detachTerminal():this.$terminal.destroyPersistentSession()}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=u({type:r,selectors:[["ng-component"]],viewQuery:function(e,i){e&1&&f(i.termTarget,_,5),e&2&&p()},hostBindings:function(e,i){e&1&&v("resize",function(n){return i.onWindowResize(n)},a)("beforeunload",function(n){return i.onBeforeUnload(n)},a)("focus",function(n){return i.onWindowFocus(n)},a)("click",function(n){return i.onClick(n)})},decls:8,vars:3,consts:[["terminaloutput",""],[1,"row","mb-3"],[1,"col-12"],[1,"primary-text","m-0"],[1,"flex-column","d-flex","align-items-stretch","adjust-for-mobile"],["id","docker-terminal",1,"align-self-end","w-100","h-100","mb-1"]],template:function(e,i){e&1&&(m(0,"div",1)(1,"div",2)(2,"h3",3),g(3),y(4,"translate"),l()()(),m(5,"div",4),h(6,"div",5,0),l()),e&2&&(c(3),T(b(4,1,"menu.linux.label_terminal")))},dependencies:[w],encapsulation:2})}return r})();export{A as TerminalComponent};
@@ -1 +1 @@
1
- import{g as i}from"./chunk-YMAWYUA6.js";import{Xa as e,fa as o}from"./chunk-V2XN5VIX.js";var m=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"restart-server",loadComponent:()=>import("./chunk-AP6Z5Y4X.js").then(t=>t.RestartLinuxComponent)},{path:"shutdown-server",loadComponent:()=>import("./chunk-VQGEOKAU.js").then(t=>t.ShutdownLinuxComponent)}],n=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[i.forChild(m),i]})}return t})();var c=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[n]})}return t})();export{c as LinuxModule};
1
+ import{g as i}from"./chunk-YMAWYUA6.js";import{Xa as e,fa as o}from"./chunk-V2XN5VIX.js";var m=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"restart-server",loadComponent:()=>import("./chunk-I7RCBEV6.js").then(t=>t.RestartLinuxComponent)},{path:"shutdown-server",loadComponent:()=>import("./chunk-C5326JMO.js").then(t=>t.ShutdownLinuxComponent)}],n=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[i.forChild(m),i]})}return t})();var c=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[n]})}return t})();export{c as LinuxModule};
@@ -1 +1 @@
1
- import{a as _,b as D}from"./chunk-HPUVHUIE.js";import{p as c,q as S}from"./chunk-7KLW5GIG.js";import{C as v,Xa as I,ad as x,ea as h,fa as E,g as O,h as a,ha as y,ia as l,ja as f,r as p,ta as j,w as d,x as T,z as w}from"./chunk-V2XN5VIX.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)})}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())}})}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)}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}}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))}}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac})}return r})();export{F as a,q as b};
1
+ import{a as _,b as D}from"./chunk-Y6PTF4YJ.js";import{p as c,q as S}from"./chunk-KWFXAMYZ.js";import{C as v,Xa as I,ad as x,ea as h,fa as E,g as O,h as a,ha as y,ia as l,ja as f,r as p,ta as j,w as d,x as T,z as w}from"./chunk-V2XN5VIX.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)})}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())}})}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)}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}}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))}}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac})}return r})();export{F as a,q as b};
@@ -1 +1 @@
1
- import{a as B}from"./chunk-JY7WBI77.js";import{n as k,t as $}from"./chunk-LXFVNKLD.js";import"./chunk-F7ZV2JBO.js";import{d as P}from"./chunk-YMAWYUA6.js";import{b as V}from"./chunk-HPUVHUIE.js";import{k as y,l as T,n as I,q as O}from"./chunk-7KLW5GIG.js";import{Db as b,Gb as m,Ib as w,La as i,Vb as c,Wa as h,Wb as S,Xb as d,ja as p,lb as f,mb as v,mc as a,nc as s,oa as u,pa as _,rb as g,sb as o,tb as r,ub as C}from"./chunk-V2XN5VIX.js";function H(e,x){if(e&1){let t=b();o(0,"p",5)(1,"button",6),m("click",function(){u(t);let n=w();return _(n.restartServer())}),c(2),a(3,"translate"),r()()}e&2&&(i(2),d(" ",s(3,1,"menu.linux.label_restart_server")," "))}function D(e,x){if(e&1){let t=b();o(0,"p",5)(1,"button",6),m("click",function(){u(t);let n=w();return _(n.shutdownServer())}),c(2),a(3,"translate"),r()()}e&2&&(i(2),d(" ",s(3,1,"menu.linux.label_shutdown_server")," "))}function R(e,x){if(e&1){let t=b();o(0,"p",5)(1,"button",6),m("click",function(){u(t);let n=w();return _(n.dockerRestartContainer())}),c(2),a(3,"translate"),r()()}e&2&&(i(2),d(" ",s(3,1,"menu.docker.restart_container")," "))}var K=(()=>{class e{$api=p(O);$modal=p(k);$router=p(P);$settings=p(V);$toastr=p(I);$translate=p(y);canShutdownRestartHost=this.$settings.env.canShutdownRestartHost;runningInDocker=this.$settings.env.runningInDocker;restartHomebridge(){this.$router.navigate(["/restart"])}restartHomebridgeService(){this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>{this.$router.navigate(["/restart"])},error:t=>{console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}})}restartServer(){this.$router.navigate(["/platform-tools/linux/restart-server"])}shutdownServer(){let t=this.$modal.open(B,{size:"lg",backdrop:"static"});t.componentInstance.title=this.$translate.instant("menu.linux.label_shutdown_server"),t.componentInstance.message=this.$translate.instant("menu.linux.label_shutdown_modal"),t.componentInstance.confirmButtonLabel=this.$translate.instant("form.button_continue"),t.componentInstance.faIconClass="fa fa-fw fa-power-off primary-text",t.result.then(()=>{this.$router.navigate(["/platform-tools/linux/shutdown-server"])}).catch(()=>{})}dockerRestartContainer(){this.$router.navigate(["/platform-tools/docker/restart-container"])}static \u0275fac=function(l){return new(l||e)};static \u0275cmp=h({type:e,selectors:[["ng-component"]],decls:19,vars:16,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-fw","fa-power-off",2,"font-size","75px"],[1,"w-100","text-center","my-5"],["type","button",1,"btn","btn-primary","p-3","my-0",2,"width","85%",3,"click"],["type","button","container","body","triggers","hover",1,"btn","btn-primary","p-3","my-0",2,"width","85%",3,"click","openDelay","ngbTooltip"]],template:function(l,n){l&1&&(o(0,"div",0)(1,"h3",1),c(2),a(3,"translate"),r()(),o(4,"div",2)(5,"div",3),C(6,"i",4),r(),o(7,"p",5)(8,"button",6),m("click",function(){return n.restartHomebridge()}),c(9),a(10,"translate"),r()(),o(11,"p",5)(12,"button",7),a(13,"translate"),m("click",function(){return n.restartHomebridgeService()}),c(14),a(15,"translate"),r()(),f(16,H,4,3,"p",5),f(17,D,4,3,"p",5),f(18,R,4,3,"p",5),r()),l&2&&(i(2),S(s(3,8,"menu.restart.title")),i(7),d(" ",s(10,10,"menu.hbrestart.confirm_hb")," "),i(3),g("openDelay",150)("ngbTooltip",s(13,12,"reset.force_restart_hb_help_text")),i(2),d(" ",s(15,14,"menu.hbrestart.confirm_ui")," "),i(2),v(n.canShutdownRestartHost?16:-1),i(),v(n.canShutdownRestartHost?17:-1),i(),v(n.runningInDocker?18:-1))},dependencies:[$,T],encapsulation:2})}return e})();export{K as PowerOptionsComponent};
1
+ import{a as B}from"./chunk-C7QDL5WP.js";import{n as k,t as $}from"./chunk-LXFVNKLD.js";import"./chunk-F7ZV2JBO.js";import{d as P}from"./chunk-YMAWYUA6.js";import{b as V}from"./chunk-Y6PTF4YJ.js";import{k as y,l as T,n as I,q as O}from"./chunk-KWFXAMYZ.js";import{Db as b,Gb as m,Ib as w,La as i,Vb as c,Wa as h,Wb as S,Xb as d,ja as p,lb as f,mb as v,mc as a,nc as s,oa as u,pa as _,rb as g,sb as o,tb as r,ub as C}from"./chunk-V2XN5VIX.js";function H(e,x){if(e&1){let t=b();o(0,"p",5)(1,"button",6),m("click",function(){u(t);let n=w();return _(n.restartServer())}),c(2),a(3,"translate"),r()()}e&2&&(i(2),d(" ",s(3,1,"menu.linux.label_restart_server")," "))}function D(e,x){if(e&1){let t=b();o(0,"p",5)(1,"button",6),m("click",function(){u(t);let n=w();return _(n.shutdownServer())}),c(2),a(3,"translate"),r()()}e&2&&(i(2),d(" ",s(3,1,"menu.linux.label_shutdown_server")," "))}function R(e,x){if(e&1){let t=b();o(0,"p",5)(1,"button",6),m("click",function(){u(t);let n=w();return _(n.dockerRestartContainer())}),c(2),a(3,"translate"),r()()}e&2&&(i(2),d(" ",s(3,1,"menu.docker.restart_container")," "))}var K=(()=>{class e{$api=p(O);$modal=p(k);$router=p(P);$settings=p(V);$toastr=p(I);$translate=p(y);canShutdownRestartHost=this.$settings.env.canShutdownRestartHost;runningInDocker=this.$settings.env.runningInDocker;restartHomebridge(){this.$router.navigate(["/restart"])}restartHomebridgeService(){this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>{this.$router.navigate(["/restart"])},error:t=>{console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}})}restartServer(){this.$router.navigate(["/platform-tools/linux/restart-server"])}shutdownServer(){let t=this.$modal.open(B,{size:"lg",backdrop:"static"});t.componentInstance.title=this.$translate.instant("menu.linux.label_shutdown_server"),t.componentInstance.message=this.$translate.instant("menu.linux.label_shutdown_modal"),t.componentInstance.confirmButtonLabel=this.$translate.instant("form.button_continue"),t.componentInstance.faIconClass="fa fa-fw fa-power-off primary-text",t.result.then(()=>{this.$router.navigate(["/platform-tools/linux/shutdown-server"])}).catch(()=>{})}dockerRestartContainer(){this.$router.navigate(["/platform-tools/docker/restart-container"])}static \u0275fac=function(l){return new(l||e)};static \u0275cmp=h({type:e,selectors:[["ng-component"]],decls:19,vars:16,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-fw","fa-power-off",2,"font-size","75px"],[1,"w-100","text-center","my-5"],["type","button",1,"btn","btn-primary","p-3","my-0",2,"width","85%",3,"click"],["type","button","container","body","triggers","hover",1,"btn","btn-primary","p-3","my-0",2,"width","85%",3,"click","openDelay","ngbTooltip"]],template:function(l,n){l&1&&(o(0,"div",0)(1,"h3",1),c(2),a(3,"translate"),r()(),o(4,"div",2)(5,"div",3),C(6,"i",4),r(),o(7,"p",5)(8,"button",6),m("click",function(){return n.restartHomebridge()}),c(9),a(10,"translate"),r()(),o(11,"p",5)(12,"button",7),a(13,"translate"),m("click",function(){return n.restartHomebridgeService()}),c(14),a(15,"translate"),r()(),f(16,H,4,3,"p",5),f(17,D,4,3,"p",5),f(18,R,4,3,"p",5),r()),l&2&&(i(2),S(s(3,8,"menu.restart.title")),i(7),d(" ",s(10,10,"menu.hbrestart.confirm_hb")," "),i(3),g("openDelay",150)("ngbTooltip",s(13,12,"reset.force_restart_hb_help_text")),i(2),d(" ",s(15,14,"menu.hbrestart.confirm_ui")," "),i(2),v(n.canShutdownRestartHost?16:-1),i(),v(n.canShutdownRestartHost?17:-1),i(),v(n.runningInDocker?18:-1))},dependencies:[$,T],encapsulation:2})}return e})();export{K as PowerOptionsComponent};
@@ -1,4 +1,4 @@
1
- import{a as z,b as A,c as k}from"./chunk-YOAZTJFX.js";import{a as l}from"./chunk-74TLD7UE.js";import{M as n,ea as c,g as r,ja as d,n as h}from"./chunk-V2XN5VIX.js";var f=r(z(),1),a=r(A(),1),p=r(k(),1);var $=(()=>{class t{$ws=d(l);io;fitAddon;webLinksAddon;resize;elementResize;pluginName;term;startTerminal(m,s={},u,w){this.pluginName=w,this.elementResize=u,this.io=this.$ws.connectToNamespace("log"),this.term=new p.Terminal(s),setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.fitAddon=new f.FitAddon,this.webLinksAddon=new a.WebLinksAddon,this.resize=new h,this.term.open(m.nativeElement),setTimeout(()=>{this.fitAddon.activate(this.term),this.fitAddon.fit()}),this.io.connected.subscribe(()=>{this.term.reset(),this.io.socket.emit("tail-log",{cols:this.term.cols,rows:this.term.rows})}),this.io.socket.on("disconnect",()=>{this.term.write(`
1
+ import{a as z,b as A,c as k}from"./chunk-YOAZTJFX.js";import{a as l}from"./chunk-6TQFT6P4.js";import{M as n,ea as c,g as r,ja as d,n as h}from"./chunk-V2XN5VIX.js";var f=r(z(),1),a=r(A(),1),p=r(k(),1);var $=(()=>{class t{$ws=d(l);io;fitAddon;webLinksAddon;resize;elementResize;pluginName;term;startTerminal(m,s={},u,w){this.pluginName=w,this.elementResize=u,this.io=this.$ws.connectToNamespace("log"),this.term=new p.Terminal(s),setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.fitAddon=new f.FitAddon,this.webLinksAddon=new a.WebLinksAddon,this.resize=new h,this.term.open(m.nativeElement),setTimeout(()=>{this.fitAddon.activate(this.term),this.fitAddon.fit()}),this.io.connected.subscribe(()=>{this.term.reset(),this.io.socket.emit("tail-log",{cols:this.term.cols,rows:this.term.rows})}),this.io.socket.on("disconnect",()=>{this.term.write(`
2
2
  \r
3
3
  \rWebsocket failed to connect. Is the server running?
4
4
  \r
@@ -1 +1 @@
1
- import{a as l}from"./chunk-4NGXWZXZ.js";import{a as m}from"./chunk-JY7WBI77.js";import{n as s}from"./chunk-LXFVNKLD.js";import{b as o}from"./chunk-HPUVHUIE.js";import{k as i}from"./chunk-7KLW5GIG.js";import{ea as r,ja as n}from"./chunk-V2XN5VIX.js";var I=(()=>{class e{$terminal=n(l);$settings=n(o);$modal=n(s);$translate=n(i);handleBeforeUnload(t){if(!this.$settings.env.terminal?.persistence&&!this.$settings.env.terminal?.hideWarning&&this.$terminal.hasActiveSession()&&this.$terminal.hasUserTypedInSession()){let a=this.$translate.instant("platform.terminal.terminate_unload");return t.preventDefault(),t.returnValue=a,a}}canDeactivate(){if(this.$settings.env.terminal?.persistence||this.$settings.env.terminal?.hideWarning||!this.$terminal.hasActiveSession()||!this.$terminal.hasUserTypedInSession())return!0;let t=this.$modal.open(m,{size:"lg",backdrop:"static"});return t.componentInstance.title=this.$translate.instant("platform.terminal.terminate_title"),t.componentInstance.message=this.$translate.instant("platform.terminal.terminate_message_1"),t.componentInstance.message2=this.$translate.instant("platform.terminal.terminate_message_2"),t.componentInstance.message3=this.$translate.instant("common.phrases.are_you_sure"),t.componentInstance.confirmButtonLabel=this.$translate.instant("form.button_continue"),t.componentInstance.confirmButtonClass="btn-primary",t.componentInstance.faIconClass="fas fa-exclamation-triangle text-warning",t.result.then(()=>!0).catch(()=>!1)}static \u0275fac=function(a){return new(a||e)};static \u0275prov=r({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{I as a};
1
+ import{a as l}from"./chunk-D6XKSCC5.js";import{a as m}from"./chunk-C7QDL5WP.js";import{n as s}from"./chunk-LXFVNKLD.js";import{b as o}from"./chunk-Y6PTF4YJ.js";import{k as i}from"./chunk-KWFXAMYZ.js";import{ea as r,ja as n}from"./chunk-V2XN5VIX.js";var I=(()=>{class e{$terminal=n(l);$settings=n(o);$modal=n(s);$translate=n(i);handleBeforeUnload(t){if(!this.$settings.env.terminal?.persistence&&!this.$settings.env.terminal?.hideWarning&&this.$terminal.hasActiveSession()&&this.$terminal.hasUserTypedInSession()){let a=this.$translate.instant("platform.terminal.terminate_unload");return t.preventDefault(),t.returnValue=a,a}}canDeactivate(){if(this.$settings.env.terminal?.persistence||this.$settings.env.terminal?.hideWarning||!this.$terminal.hasActiveSession()||!this.$terminal.hasUserTypedInSession())return!0;let t=this.$modal.open(m,{size:"lg",backdrop:"static"});return t.componentInstance.title=this.$translate.instant("platform.terminal.terminate_title"),t.componentInstance.message=this.$translate.instant("platform.terminal.terminate_message_1"),t.componentInstance.message2=this.$translate.instant("platform.terminal.terminate_message_2"),t.componentInstance.message3=this.$translate.instant("common.phrases.are_you_sure"),t.componentInstance.confirmButtonLabel=this.$translate.instant("form.button_continue"),t.componentInstance.confirmButtonClass="btn-primary",t.componentInstance.faIconClass="fas fa-exclamation-triangle text-warning",t.result.then(()=>!0).catch(()=>!1)}static \u0275fac=function(a){return new(a||e)};static \u0275prov=r({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{I as a};
@@ -1,4 +1,4 @@
1
- import{a as Gv}from"./chunk-CX6JKA5M.js";import{a as xp,c as Vv,d as Kv,e as un,f as qs,g as hR}from"./chunk-BD4L4MMU.js";import{a as Mv}from"./chunk-ECQJTOVP.js";import{a as qv}from"./chunk-I5TETZ3I.js";import{a as Lv}from"./chunk-LTBNWBMR.js";import{a as Rv,b as Fv,c as Ov}from"./chunk-YOAZTJFX.js";import{a as Pa}from"./chunk-KT4VIVBF.js";import{a as $v}from"./chunk-SGN6BUCA.js";import{a as cd,b as gd}from"./chunk-ZZ3PNQCV.js";import{a as dd,b as ud}from"./chunk-74ETBIBO.js";import{a as Uv}from"./chunk-JY7WBI77.js";import{a as sd,b as od,c as rd,d as nd,e as ad,f as ld,g as dn,m as zt,n as ei,o as jv,p as Nv,q as Dv,r as Bv,s as Ev,t as Ko}from"./chunk-LXFVNKLD.js";import{A as Av,B as Cs,C as Ta,a as Hv,b as Fo,c as kr,e as ci,f as Sv,h as Cv,i as xv,j as Iv,k as Tv,l as cs,m as Pv,o as zv,p as Oo,s as cn,t as qo,u as Cp,v as Vo}from"./chunk-F7ZV2JBO.js";import{a as Lo}from"./chunk-74TLD7UE.js";import{d as Os}from"./chunk-YMAWYUA6.js";import{b as jt}from"./chunk-HPUVHUIE.js";import{k as gt,l as At,n as pt,p as $o,q as ot}from"./chunk-7KLW5GIG.js";import{$ as Ca,$c as kv,Ac as vv,Ba as nn,D as cv,Db as ae,Ga as qe,Gb as Q,Hb as ed,Ib as C,Ka as mv,Kc as ls,La as m,Lc as Ro,M as on,Mb as kp,Mc as li,Nb as Hp,Ob as Sp,Pa as Yc,Pb as Eo,Qa as uo,Qb as Mo,Rb as fv,Sa as br,Sb as Hs,Tb as Fs,Tc as id,Ub as fe,Vb as A,Wa as we,Wb as le,Xa as an,Xb as ie,Xc as wv,Y as wp,Ya as yr,Yb as vr,Za as hv,Zb as td,a as ye,ab as Ie,ac as lt,b as nt,bb as _v,bc as ct,c as ov,cb as Jc,cc as dt,da as dv,dc as bv,e as w,ea as Gi,ec as yv,fa as rn,fc as ut,g as at,gc as Ss,h as he,ha as uv,hc as wr,ia as gv,ic as as,ja as q,jc as ln,k as rv,kb as pe,lb as R,mb as F,mc as N,n as Li,nc as M,o as vp,oa as J,ob as wi,oc as Et,pa as Z,pb as ki,q as nv,qb as Hi,rb as I,sb as y,tb as b,ub as E,v as av,vb as Zc,vc as Si,w as Ee,wa as Wc,wb as Qc,wc as re,x as lv,xb as Xc,xc as Uo,ya as Bo,yb as xa,za as pv,zb as Ia}from"./chunk-V2XN5VIX.js";var tw=w(Ks=>{"use strict";Object.defineProperty(Ks,"__esModule",{value:!0});Ks.formatNames=Ks.fastFormats=Ks.fullFormats=void 0;function Vs(e,i){return{validate:e,compare:i}}Ks.fullFormats={date:Vs(Zv,zp),time:Vs(Tp(!0),Ap),"date-time":Vs(Wv(!0),Xv),"iso-time":Vs(Tp(),Qv),"iso-date-time":Vs(Wv(),ew),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:wR,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:TR,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:kR,int32:{type:"number",validate:CR},int64:{type:"number",validate:xR},float:{type:"number",validate:Jv},double:{type:"number",validate:Jv},password:!0,binary:!0};Ks.fastFormats=nt(ye({},Ks.fullFormats),{date:Vs(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,zp),time:Vs(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Ap),"date-time":Vs(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Xv),"iso-time":Vs(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Qv),"iso-date-time":Vs(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,ew),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i});Ks.formatNames=Object.keys(Ks.fullFormats);function _R(e){return e%4===0&&(e%100!==0||e%400===0)}var fR=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,bR=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Zv(e){let i=fR.exec(e);if(!i)return!1;let t=+i[1],s=+i[2],o=+i[3];return s>=1&&s<=12&&o>=1&&o<=(s===2&&_R(t)?29:bR[s])}function zp(e,i){if(e&&i)return e>i?1:e<i?-1:0}var Ip=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Tp(e){return function(t){let s=Ip.exec(t);if(!s)return!1;let o=+s[1],n=+s[2],l=+s[3],c=s[4],u=s[5]==="-"?-1:1,p=+(s[6]||0),h=+(s[7]||0);if(p>23||h>59||e&&!c)return!1;if(o<=23&&n<=59&&l<60)return!0;let f=n-h*u,S=o-p*u-(f<0?1:0);return(S===23||S===-1)&&(f===59||f===-1)&&l<61}}function Ap(e,i){if(!(e&&i))return;let t=new Date("2020-01-01T"+e).valueOf(),s=new Date("2020-01-01T"+i).valueOf();if(t&&s)return t-s}function Qv(e,i){if(!(e&&i))return;let t=Ip.exec(e),s=Ip.exec(i);if(t&&s)return e=t[1]+t[2]+t[3],i=s[1]+s[2]+s[3],e>i?1:e<i?-1:0}var Pp=/t|\s/i;function Wv(e){let i=Tp(e);return function(s){let o=s.split(Pp);return o.length===2&&Zv(o[0])&&i(o[1])}}function Xv(e,i){if(!(e&&i))return;let t=new Date(e).valueOf(),s=new Date(i).valueOf();if(t&&s)return t-s}function ew(e,i){if(!(e&&i))return;let[t,s]=e.split(Pp),[o,n]=i.split(Pp),l=zp(t,o);if(l!==void 0)return l||Ap(s,n)}var yR=/\/|:/,vR=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function wR(e){return yR.test(e)&&vR.test(e)}var Yv=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function kR(e){return Yv.lastIndex=0,Yv.test(e)}var HR=-(2**31),SR=2**31-1;function CR(e){return Number.isInteger(e)&&e<=SR&&e>=HR}function xR(e){return Number.isInteger(e)}function Jv(){return!0}var IR=/[^\\]\\Z/;function TR(e){if(IR.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var ja=w(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.regexpCode=Xe.getEsmExportName=Xe.getProperty=Xe.safeStringify=Xe.stringify=Xe.strConcat=Xe.addCodeArg=Xe.str=Xe._=Xe.nil=Xe._Code=Xe.Name=Xe.IDENTIFIER=Xe._CodeOrName=void 0;var za=class{};Xe._CodeOrName=za;Xe.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Hr=class extends za{constructor(i){if(super(),!Xe.IDENTIFIER.test(i))throw new Error("CodeGen: name must be a valid identifier");this.str=i}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Xe.Name=Hr;var ds=class extends za{constructor(i){super(),this._items=typeof i=="string"?[i]:i}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let i=this._items[0];return i===""||i==='""'}get str(){var i;return(i=this._str)!==null&&i!==void 0?i:this._str=this._items.reduce((t,s)=>`${t}${s}`,"")}get names(){var i;return(i=this._names)!==null&&i!==void 0?i:this._names=this._items.reduce((t,s)=>(s instanceof Hr&&(t[s.str]=(t[s.str]||0)+1),t),{})}};Xe._Code=ds;Xe.nil=new ds("");function iw(e,...i){let t=[e[0]],s=0;for(;s<i.length;)Np(t,i[s]),t.push(e[++s]);return new ds(t)}Xe._=iw;var jp=new ds("+");function sw(e,...i){let t=[Aa(e[0])],s=0;for(;s<i.length;)t.push(jp),Np(t,i[s]),t.push(jp,Aa(e[++s]));return PR(t),new ds(t)}Xe.str=sw;function Np(e,i){i instanceof ds?e.push(...i._items):i instanceof Hr?e.push(i):e.push(jR(i))}Xe.addCodeArg=Np;function PR(e){let i=1;for(;i<e.length-1;){if(e[i]===jp){let t=zR(e[i-1],e[i+1]);if(t!==void 0){e.splice(i-1,3,t);continue}e[i++]="+"}i++}}function zR(e,i){if(i==='""')return e;if(e==='""')return i;if(typeof e=="string")return i instanceof Hr||e[e.length-1]!=='"'?void 0:typeof i!="string"?`${e.slice(0,-1)}${i}"`:i[0]==='"'?e.slice(0,-1)+i.slice(1):void 0;if(typeof i=="string"&&i[0]==='"'&&!(e instanceof Hr))return`"${e}${i.slice(1)}`}function AR(e,i){return i.emptyStr()?e:e.emptyStr()?i:sw`${e}${i}`}Xe.strConcat=AR;function jR(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Aa(Array.isArray(e)?e.join(","):e)}function NR(e){return new ds(Aa(e))}Xe.stringify=NR;function Aa(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Xe.safeStringify=Aa;function DR(e){return typeof e=="string"&&Xe.IDENTIFIER.test(e)?new ds(`.${e}`):iw`[${e}]`}Xe.getProperty=DR;function BR(e){if(typeof e=="string"&&Xe.IDENTIFIER.test(e))return new ds(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Xe.getEsmExportName=BR;function ER(e){return new ds(e.toString())}Xe.regexpCode=ER});var Ep=w(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.ValueScope=Ni.ValueScopeName=Ni.Scope=Ni.varKinds=Ni.UsedValueState=void 0;var ji=ja(),Dp=class extends Error{constructor(i){super(`CodeGen: "code" for ${i} not defined`),this.value=i.value}},pd=(function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e})(pd||(Ni.UsedValueState=pd={}));Ni.varKinds={const:new ji.Name("const"),let:new ji.Name("let"),var:new ji.Name("var")};var md=class{constructor({prefixes:i,parent:t}={}){this._names={},this._prefixes=i,this._parent=t}toName(i){return i instanceof ji.Name?i:this.name(i)}name(i){return new ji.Name(this._newName(i))}_newName(i){let t=this._names[i]||this._nameGroup(i);return`${i}${t.index++}`}_nameGroup(i){var t,s;if(!((s=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||s===void 0)&&s.has(i)||this._prefixes&&!this._prefixes.has(i))throw new Error(`CodeGen: prefix "${i}" is not allowed in this scope`);return this._names[i]={prefix:i,index:0}}};Ni.Scope=md;var hd=class extends ji.Name{constructor(i,t){super(t),this.prefix=i}setValue(i,{property:t,itemIndex:s}){this.value=i,this.scopePath=(0,ji._)`.${new ji.Name(t)}[${s}]`}};Ni.ValueScopeName=hd;var MR=(0,ji._)`\n`,Bp=class extends md{constructor(i){super(i),this._values={},this._scope=i.scope,this.opts=nt(ye({},i),{_n:i.lines?MR:ji.nil})}get(){return this._scope}name(i){return new hd(i,this._newName(i))}value(i,t){var s;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(i),{prefix:n}=o,l=(s=t.key)!==null&&s!==void 0?s:t.ref,c=this._values[n];if(c){let h=c.get(l);if(h)return h}else c=this._values[n]=new Map;c.set(l,o);let u=this._scope[n]||(this._scope[n]=[]),p=u.length;return u[p]=t.ref,o.setValue(t,{property:n,itemIndex:p}),o}getValue(i,t){let s=this._values[i];if(s)return s.get(t)}scopeRefs(i,t=this._values){return this._reduceValues(t,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,ji._)`${i}${s.scopePath}`})}scopeCode(i=this._values,t,s){return this._reduceValues(i,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},t,s)}_reduceValues(i,t,s={},o){let n=ji.nil;for(let l in i){let c=i[l];if(!c)continue;let u=s[l]=s[l]||new Map;c.forEach(p=>{if(u.has(p))return;u.set(p,pd.Started);let h=t(p);if(h){let f=this.opts.es5?Ni.varKinds.var:Ni.varKinds.const;n=(0,ji._)`${n}${f} ${p} = ${h};${this.opts._n}`}else if(h=o?.(p))n=(0,ji._)`${n}${h}${this.opts._n}`;else throw new Dp(p);u.set(p,pd.Completed)})}return n}};Ni.ValueScope=Bp});var ke=w(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.or=Oe.and=Oe.not=Oe.CodeGen=Oe.operators=Oe.varKinds=Oe.ValueScopeName=Oe.ValueScope=Oe.Scope=Oe.Name=Oe.regexpCode=Oe.stringify=Oe.getProperty=Oe.nil=Oe.strConcat=Oe.str=Oe._=void 0;var Je=ja(),xs=Ep(),Go=ja();Object.defineProperty(Oe,"_",{enumerable:!0,get:function(){return Go._}});Object.defineProperty(Oe,"str",{enumerable:!0,get:function(){return Go.str}});Object.defineProperty(Oe,"strConcat",{enumerable:!0,get:function(){return Go.strConcat}});Object.defineProperty(Oe,"nil",{enumerable:!0,get:function(){return Go.nil}});Object.defineProperty(Oe,"getProperty",{enumerable:!0,get:function(){return Go.getProperty}});Object.defineProperty(Oe,"stringify",{enumerable:!0,get:function(){return Go.stringify}});Object.defineProperty(Oe,"regexpCode",{enumerable:!0,get:function(){return Go.regexpCode}});Object.defineProperty(Oe,"Name",{enumerable:!0,get:function(){return Go.Name}});var vd=Ep();Object.defineProperty(Oe,"Scope",{enumerable:!0,get:function(){return vd.Scope}});Object.defineProperty(Oe,"ValueScope",{enumerable:!0,get:function(){return vd.ValueScope}});Object.defineProperty(Oe,"ValueScopeName",{enumerable:!0,get:function(){return vd.ValueScopeName}});Object.defineProperty(Oe,"varKinds",{enumerable:!0,get:function(){return vd.varKinds}});Oe.operators={GT:new Je._Code(">"),GTE:new Je._Code(">="),LT:new Je._Code("<"),LTE:new Je._Code("<="),EQ:new Je._Code("==="),NEQ:new Je._Code("!=="),NOT:new Je._Code("!"),OR:new Je._Code("||"),AND:new Je._Code("&&"),ADD:new Je._Code("+")};var go=class{optimizeNodes(){return this}optimizeNames(i,t){return this}},Mp=class extends go{constructor(i,t,s){super(),this.varKind=i,this.name=t,this.rhs=s}render({es5:i,_n:t}){let s=i?xs.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${o};`+t}optimizeNames(i,t){if(i[this.name.str])return this.rhs&&(this.rhs=gn(this.rhs,i,t)),this}get names(){return this.rhs instanceof Je._CodeOrName?this.rhs.names:{}}},fd=class extends go{constructor(i,t,s){super(),this.lhs=i,this.rhs=t,this.sideEffects=s}render({_n:i}){return`${this.lhs} = ${this.rhs};`+i}optimizeNames(i,t){if(!(this.lhs instanceof Je.Name&&!i[this.lhs.str]&&!this.sideEffects))return this.rhs=gn(this.rhs,i,t),this}get names(){let i=this.lhs instanceof Je.Name?{}:ye({},this.lhs.names);return yd(i,this.rhs)}},Up=class extends fd{constructor(i,t,s,o){super(i,s,o),this.op=t}render({_n:i}){return`${this.lhs} ${this.op}= ${this.rhs};`+i}},Rp=class extends go{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`${this.label}:`+i}},Fp=class extends go{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`break${this.label?` ${this.label}`:""};`+i}},Op=class extends go{constructor(i){super(),this.error=i}render({_n:i}){return`throw ${this.error};`+i}get names(){return this.error.names}},qp=class extends go{constructor(i){super(),this.code=i}render({_n:i}){return`${this.code};`+i}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(i,t){return this.code=gn(this.code,i,t),this}get names(){return this.code instanceof Je._CodeOrName?this.code.names:{}}},Na=class extends go{constructor(i=[]){super(),this.nodes=i}render(i){return this.nodes.reduce((t,s)=>t+s.render(i),"")}optimizeNodes(){let{nodes:i}=this,t=i.length;for(;t--;){let s=i[t].optimizeNodes();Array.isArray(s)?i.splice(t,1,...s):s?i[t]=s:i.splice(t,1)}return i.length>0?this:void 0}optimizeNames(i,t){let{nodes:s}=this,o=s.length;for(;o--;){let n=s[o];n.optimizeNames(i,t)||(UR(i,n.names),s.splice(o,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((i,t)=>Sr(i,t.names),{})}},po=class extends Na{render(i){return"{"+i._n+super.render(i)+"}"+i._n}},Vp=class extends Na{},Kp=(()=>{class e extends po{}return e.kind="else",e})(),_d=(()=>{class e extends po{constructor(t,s){super(s),this.condition=t}render(t){let s=`if(${this.condition})`+super.render(t);return this.else&&(s+="else "+this.else.render(t)),s}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let s=this.else;if(s){let o=s.optimizeNodes();s=this.else=Array.isArray(o)?new Kp(o):o}if(s)return t===!1?s instanceof e?s:s.nodes:this.nodes.length?this:new e(lw(t),s instanceof e?[s]:s.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,s){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,s),!!(super.optimizeNames(t,s)||this.else))return this.condition=gn(this.condition,t,s),this}get names(){let t=super.names;return yd(t,this.condition),this.else&&Sr(t,this.else.names),t}}return e.kind="if",e})(),wd=(()=>{class e extends po{}return e.kind="for",e})(),$p=class extends wd{constructor(i){super(),this.iteration=i}render(i){return`for(${this.iteration})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iteration=gn(this.iteration,i,t),this}get names(){return Sr(super.names,this.iteration.names)}},Lp=class extends wd{constructor(i,t,s,o){super(),this.varKind=i,this.name=t,this.from=s,this.to=o}render(i){let t=i.es5?xs.varKinds.var:this.varKind,{name:s,from:o,to:n}=this;return`for(${t} ${s}=${o}; ${s}<${n}; ${s}++)`+super.render(i)}get names(){let i=yd(super.names,this.from);return yd(i,this.to)}},bd=class extends wd{constructor(i,t,s,o){super(),this.loop=i,this.varKind=t,this.name=s,this.iterable=o}render(i){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iterable=gn(this.iterable,i,t),this}get names(){return Sr(super.names,this.iterable.names)}},ow=(()=>{class e extends po{constructor(t,s,o){super(),this.name=t,this.args=s,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),rw=(()=>{class e extends Na{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Gp=class extends po{render(i){let t="try"+super.render(i);return this.catch&&(t+=this.catch.render(i)),this.finally&&(t+=this.finally.render(i)),t}optimizeNodes(){var i,t;return super.optimizeNodes(),(i=this.catch)===null||i===void 0||i.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(i,t){var s,o;return super.optimizeNames(i,t),(s=this.catch)===null||s===void 0||s.optimizeNames(i,t),(o=this.finally)===null||o===void 0||o.optimizeNames(i,t),this}get names(){let i=super.names;return this.catch&&Sr(i,this.catch.names),this.finally&&Sr(i,this.finally.names),i}},nw=(()=>{class e extends po{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),aw=(()=>{class e extends po{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Wp=class{constructor(i,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=nt(ye({},t),{_n:t.lines?`
1
+ import{a as Gv}from"./chunk-QGV5APZY.js";import{a as xp,c as Vv,d as Kv,e as un,f as qs,g as hR}from"./chunk-IOCF6PSL.js";import{a as Mv}from"./chunk-ECQJTOVP.js";import{a as qv}from"./chunk-I5TETZ3I.js";import{a as Lv}from"./chunk-TRJG3WAE.js";import{a as Rv,b as Fv,c as Ov}from"./chunk-YOAZTJFX.js";import{a as Pa}from"./chunk-KT4VIVBF.js";import{a as $v}from"./chunk-SGN6BUCA.js";import{a as cd,b as gd}from"./chunk-ZZ3PNQCV.js";import{a as dd,b as ud}from"./chunk-74ETBIBO.js";import{a as Uv}from"./chunk-C7QDL5WP.js";import{a as sd,b as od,c as rd,d as nd,e as ad,f as ld,g as dn,m as zt,n as ei,o as jv,p as Nv,q as Dv,r as Bv,s as Ev,t as Ko}from"./chunk-LXFVNKLD.js";import{A as Av,B as Cs,C as Ta,a as Hv,b as Fo,c as kr,e as ci,f as Sv,h as Cv,i as xv,j as Iv,k as Tv,l as cs,m as Pv,o as zv,p as Oo,s as cn,t as qo,u as Cp,v as Vo}from"./chunk-F7ZV2JBO.js";import{a as Lo}from"./chunk-6TQFT6P4.js";import{d as Os}from"./chunk-YMAWYUA6.js";import{b as jt}from"./chunk-Y6PTF4YJ.js";import{k as gt,l as At,n as pt,p as $o,q as ot}from"./chunk-KWFXAMYZ.js";import{$ as Ca,$c as kv,Ac as vv,Ba as nn,D as cv,Db as ae,Ga as qe,Gb as Q,Hb as ed,Ib as C,Ka as mv,Kc as ls,La as m,Lc as Ro,M as on,Mb as kp,Mc as li,Nb as Hp,Ob as Sp,Pa as Yc,Pb as Eo,Qa as uo,Qb as Mo,Rb as fv,Sa as br,Sb as Hs,Tb as Fs,Tc as id,Ub as fe,Vb as A,Wa as we,Wb as le,Xa as an,Xb as ie,Xc as wv,Y as wp,Ya as yr,Yb as vr,Za as hv,Zb as td,a as ye,ab as Ie,ac as lt,b as nt,bb as _v,bc as ct,c as ov,cb as Jc,cc as dt,da as dv,dc as bv,e as w,ea as Gi,ec as yv,fa as rn,fc as ut,g as at,gc as Ss,h as he,ha as uv,hc as wr,ia as gv,ic as as,ja as q,jc as ln,k as rv,kb as pe,lb as R,mb as F,mc as N,n as Li,nc as M,o as vp,oa as J,ob as wi,oc as Et,pa as Z,pb as ki,q as nv,qb as Hi,rb as I,sb as y,tb as b,ub as E,v as av,vb as Zc,vc as Si,w as Ee,wa as Wc,wb as Qc,wc as re,x as lv,xb as Xc,xc as Uo,ya as Bo,yb as xa,za as pv,zb as Ia}from"./chunk-V2XN5VIX.js";var tw=w(Ks=>{"use strict";Object.defineProperty(Ks,"__esModule",{value:!0});Ks.formatNames=Ks.fastFormats=Ks.fullFormats=void 0;function Vs(e,i){return{validate:e,compare:i}}Ks.fullFormats={date:Vs(Zv,zp),time:Vs(Tp(!0),Ap),"date-time":Vs(Wv(!0),Xv),"iso-time":Vs(Tp(),Qv),"iso-date-time":Vs(Wv(),ew),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:wR,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:TR,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:kR,int32:{type:"number",validate:CR},int64:{type:"number",validate:xR},float:{type:"number",validate:Jv},double:{type:"number",validate:Jv},password:!0,binary:!0};Ks.fastFormats=nt(ye({},Ks.fullFormats),{date:Vs(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,zp),time:Vs(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Ap),"date-time":Vs(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Xv),"iso-time":Vs(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Qv),"iso-date-time":Vs(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,ew),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i});Ks.formatNames=Object.keys(Ks.fullFormats);function _R(e){return e%4===0&&(e%100!==0||e%400===0)}var fR=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,bR=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Zv(e){let i=fR.exec(e);if(!i)return!1;let t=+i[1],s=+i[2],o=+i[3];return s>=1&&s<=12&&o>=1&&o<=(s===2&&_R(t)?29:bR[s])}function zp(e,i){if(e&&i)return e>i?1:e<i?-1:0}var Ip=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Tp(e){return function(t){let s=Ip.exec(t);if(!s)return!1;let o=+s[1],n=+s[2],l=+s[3],c=s[4],u=s[5]==="-"?-1:1,p=+(s[6]||0),h=+(s[7]||0);if(p>23||h>59||e&&!c)return!1;if(o<=23&&n<=59&&l<60)return!0;let f=n-h*u,S=o-p*u-(f<0?1:0);return(S===23||S===-1)&&(f===59||f===-1)&&l<61}}function Ap(e,i){if(!(e&&i))return;let t=new Date("2020-01-01T"+e).valueOf(),s=new Date("2020-01-01T"+i).valueOf();if(t&&s)return t-s}function Qv(e,i){if(!(e&&i))return;let t=Ip.exec(e),s=Ip.exec(i);if(t&&s)return e=t[1]+t[2]+t[3],i=s[1]+s[2]+s[3],e>i?1:e<i?-1:0}var Pp=/t|\s/i;function Wv(e){let i=Tp(e);return function(s){let o=s.split(Pp);return o.length===2&&Zv(o[0])&&i(o[1])}}function Xv(e,i){if(!(e&&i))return;let t=new Date(e).valueOf(),s=new Date(i).valueOf();if(t&&s)return t-s}function ew(e,i){if(!(e&&i))return;let[t,s]=e.split(Pp),[o,n]=i.split(Pp),l=zp(t,o);if(l!==void 0)return l||Ap(s,n)}var yR=/\/|:/,vR=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function wR(e){return yR.test(e)&&vR.test(e)}var Yv=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function kR(e){return Yv.lastIndex=0,Yv.test(e)}var HR=-(2**31),SR=2**31-1;function CR(e){return Number.isInteger(e)&&e<=SR&&e>=HR}function xR(e){return Number.isInteger(e)}function Jv(){return!0}var IR=/[^\\]\\Z/;function TR(e){if(IR.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var ja=w(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.regexpCode=Xe.getEsmExportName=Xe.getProperty=Xe.safeStringify=Xe.stringify=Xe.strConcat=Xe.addCodeArg=Xe.str=Xe._=Xe.nil=Xe._Code=Xe.Name=Xe.IDENTIFIER=Xe._CodeOrName=void 0;var za=class{};Xe._CodeOrName=za;Xe.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Hr=class extends za{constructor(i){if(super(),!Xe.IDENTIFIER.test(i))throw new Error("CodeGen: name must be a valid identifier");this.str=i}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Xe.Name=Hr;var ds=class extends za{constructor(i){super(),this._items=typeof i=="string"?[i]:i}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let i=this._items[0];return i===""||i==='""'}get str(){var i;return(i=this._str)!==null&&i!==void 0?i:this._str=this._items.reduce((t,s)=>`${t}${s}`,"")}get names(){var i;return(i=this._names)!==null&&i!==void 0?i:this._names=this._items.reduce((t,s)=>(s instanceof Hr&&(t[s.str]=(t[s.str]||0)+1),t),{})}};Xe._Code=ds;Xe.nil=new ds("");function iw(e,...i){let t=[e[0]],s=0;for(;s<i.length;)Np(t,i[s]),t.push(e[++s]);return new ds(t)}Xe._=iw;var jp=new ds("+");function sw(e,...i){let t=[Aa(e[0])],s=0;for(;s<i.length;)t.push(jp),Np(t,i[s]),t.push(jp,Aa(e[++s]));return PR(t),new ds(t)}Xe.str=sw;function Np(e,i){i instanceof ds?e.push(...i._items):i instanceof Hr?e.push(i):e.push(jR(i))}Xe.addCodeArg=Np;function PR(e){let i=1;for(;i<e.length-1;){if(e[i]===jp){let t=zR(e[i-1],e[i+1]);if(t!==void 0){e.splice(i-1,3,t);continue}e[i++]="+"}i++}}function zR(e,i){if(i==='""')return e;if(e==='""')return i;if(typeof e=="string")return i instanceof Hr||e[e.length-1]!=='"'?void 0:typeof i!="string"?`${e.slice(0,-1)}${i}"`:i[0]==='"'?e.slice(0,-1)+i.slice(1):void 0;if(typeof i=="string"&&i[0]==='"'&&!(e instanceof Hr))return`"${e}${i.slice(1)}`}function AR(e,i){return i.emptyStr()?e:e.emptyStr()?i:sw`${e}${i}`}Xe.strConcat=AR;function jR(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Aa(Array.isArray(e)?e.join(","):e)}function NR(e){return new ds(Aa(e))}Xe.stringify=NR;function Aa(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Xe.safeStringify=Aa;function DR(e){return typeof e=="string"&&Xe.IDENTIFIER.test(e)?new ds(`.${e}`):iw`[${e}]`}Xe.getProperty=DR;function BR(e){if(typeof e=="string"&&Xe.IDENTIFIER.test(e))return new ds(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Xe.getEsmExportName=BR;function ER(e){return new ds(e.toString())}Xe.regexpCode=ER});var Ep=w(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.ValueScope=Ni.ValueScopeName=Ni.Scope=Ni.varKinds=Ni.UsedValueState=void 0;var ji=ja(),Dp=class extends Error{constructor(i){super(`CodeGen: "code" for ${i} not defined`),this.value=i.value}},pd=(function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e})(pd||(Ni.UsedValueState=pd={}));Ni.varKinds={const:new ji.Name("const"),let:new ji.Name("let"),var:new ji.Name("var")};var md=class{constructor({prefixes:i,parent:t}={}){this._names={},this._prefixes=i,this._parent=t}toName(i){return i instanceof ji.Name?i:this.name(i)}name(i){return new ji.Name(this._newName(i))}_newName(i){let t=this._names[i]||this._nameGroup(i);return`${i}${t.index++}`}_nameGroup(i){var t,s;if(!((s=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||s===void 0)&&s.has(i)||this._prefixes&&!this._prefixes.has(i))throw new Error(`CodeGen: prefix "${i}" is not allowed in this scope`);return this._names[i]={prefix:i,index:0}}};Ni.Scope=md;var hd=class extends ji.Name{constructor(i,t){super(t),this.prefix=i}setValue(i,{property:t,itemIndex:s}){this.value=i,this.scopePath=(0,ji._)`.${new ji.Name(t)}[${s}]`}};Ni.ValueScopeName=hd;var MR=(0,ji._)`\n`,Bp=class extends md{constructor(i){super(i),this._values={},this._scope=i.scope,this.opts=nt(ye({},i),{_n:i.lines?MR:ji.nil})}get(){return this._scope}name(i){return new hd(i,this._newName(i))}value(i,t){var s;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(i),{prefix:n}=o,l=(s=t.key)!==null&&s!==void 0?s:t.ref,c=this._values[n];if(c){let h=c.get(l);if(h)return h}else c=this._values[n]=new Map;c.set(l,o);let u=this._scope[n]||(this._scope[n]=[]),p=u.length;return u[p]=t.ref,o.setValue(t,{property:n,itemIndex:p}),o}getValue(i,t){let s=this._values[i];if(s)return s.get(t)}scopeRefs(i,t=this._values){return this._reduceValues(t,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,ji._)`${i}${s.scopePath}`})}scopeCode(i=this._values,t,s){return this._reduceValues(i,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},t,s)}_reduceValues(i,t,s={},o){let n=ji.nil;for(let l in i){let c=i[l];if(!c)continue;let u=s[l]=s[l]||new Map;c.forEach(p=>{if(u.has(p))return;u.set(p,pd.Started);let h=t(p);if(h){let f=this.opts.es5?Ni.varKinds.var:Ni.varKinds.const;n=(0,ji._)`${n}${f} ${p} = ${h};${this.opts._n}`}else if(h=o?.(p))n=(0,ji._)`${n}${h}${this.opts._n}`;else throw new Dp(p);u.set(p,pd.Completed)})}return n}};Ni.ValueScope=Bp});var ke=w(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.or=Oe.and=Oe.not=Oe.CodeGen=Oe.operators=Oe.varKinds=Oe.ValueScopeName=Oe.ValueScope=Oe.Scope=Oe.Name=Oe.regexpCode=Oe.stringify=Oe.getProperty=Oe.nil=Oe.strConcat=Oe.str=Oe._=void 0;var Je=ja(),xs=Ep(),Go=ja();Object.defineProperty(Oe,"_",{enumerable:!0,get:function(){return Go._}});Object.defineProperty(Oe,"str",{enumerable:!0,get:function(){return Go.str}});Object.defineProperty(Oe,"strConcat",{enumerable:!0,get:function(){return Go.strConcat}});Object.defineProperty(Oe,"nil",{enumerable:!0,get:function(){return Go.nil}});Object.defineProperty(Oe,"getProperty",{enumerable:!0,get:function(){return Go.getProperty}});Object.defineProperty(Oe,"stringify",{enumerable:!0,get:function(){return Go.stringify}});Object.defineProperty(Oe,"regexpCode",{enumerable:!0,get:function(){return Go.regexpCode}});Object.defineProperty(Oe,"Name",{enumerable:!0,get:function(){return Go.Name}});var vd=Ep();Object.defineProperty(Oe,"Scope",{enumerable:!0,get:function(){return vd.Scope}});Object.defineProperty(Oe,"ValueScope",{enumerable:!0,get:function(){return vd.ValueScope}});Object.defineProperty(Oe,"ValueScopeName",{enumerable:!0,get:function(){return vd.ValueScopeName}});Object.defineProperty(Oe,"varKinds",{enumerable:!0,get:function(){return vd.varKinds}});Oe.operators={GT:new Je._Code(">"),GTE:new Je._Code(">="),LT:new Je._Code("<"),LTE:new Je._Code("<="),EQ:new Je._Code("==="),NEQ:new Je._Code("!=="),NOT:new Je._Code("!"),OR:new Je._Code("||"),AND:new Je._Code("&&"),ADD:new Je._Code("+")};var go=class{optimizeNodes(){return this}optimizeNames(i,t){return this}},Mp=class extends go{constructor(i,t,s){super(),this.varKind=i,this.name=t,this.rhs=s}render({es5:i,_n:t}){let s=i?xs.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${o};`+t}optimizeNames(i,t){if(i[this.name.str])return this.rhs&&(this.rhs=gn(this.rhs,i,t)),this}get names(){return this.rhs instanceof Je._CodeOrName?this.rhs.names:{}}},fd=class extends go{constructor(i,t,s){super(),this.lhs=i,this.rhs=t,this.sideEffects=s}render({_n:i}){return`${this.lhs} = ${this.rhs};`+i}optimizeNames(i,t){if(!(this.lhs instanceof Je.Name&&!i[this.lhs.str]&&!this.sideEffects))return this.rhs=gn(this.rhs,i,t),this}get names(){let i=this.lhs instanceof Je.Name?{}:ye({},this.lhs.names);return yd(i,this.rhs)}},Up=class extends fd{constructor(i,t,s,o){super(i,s,o),this.op=t}render({_n:i}){return`${this.lhs} ${this.op}= ${this.rhs};`+i}},Rp=class extends go{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`${this.label}:`+i}},Fp=class extends go{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`break${this.label?` ${this.label}`:""};`+i}},Op=class extends go{constructor(i){super(),this.error=i}render({_n:i}){return`throw ${this.error};`+i}get names(){return this.error.names}},qp=class extends go{constructor(i){super(),this.code=i}render({_n:i}){return`${this.code};`+i}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(i,t){return this.code=gn(this.code,i,t),this}get names(){return this.code instanceof Je._CodeOrName?this.code.names:{}}},Na=class extends go{constructor(i=[]){super(),this.nodes=i}render(i){return this.nodes.reduce((t,s)=>t+s.render(i),"")}optimizeNodes(){let{nodes:i}=this,t=i.length;for(;t--;){let s=i[t].optimizeNodes();Array.isArray(s)?i.splice(t,1,...s):s?i[t]=s:i.splice(t,1)}return i.length>0?this:void 0}optimizeNames(i,t){let{nodes:s}=this,o=s.length;for(;o--;){let n=s[o];n.optimizeNames(i,t)||(UR(i,n.names),s.splice(o,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((i,t)=>Sr(i,t.names),{})}},po=class extends Na{render(i){return"{"+i._n+super.render(i)+"}"+i._n}},Vp=class extends Na{},Kp=(()=>{class e extends po{}return e.kind="else",e})(),_d=(()=>{class e extends po{constructor(t,s){super(s),this.condition=t}render(t){let s=`if(${this.condition})`+super.render(t);return this.else&&(s+="else "+this.else.render(t)),s}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let s=this.else;if(s){let o=s.optimizeNodes();s=this.else=Array.isArray(o)?new Kp(o):o}if(s)return t===!1?s instanceof e?s:s.nodes:this.nodes.length?this:new e(lw(t),s instanceof e?[s]:s.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,s){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,s),!!(super.optimizeNames(t,s)||this.else))return this.condition=gn(this.condition,t,s),this}get names(){let t=super.names;return yd(t,this.condition),this.else&&Sr(t,this.else.names),t}}return e.kind="if",e})(),wd=(()=>{class e extends po{}return e.kind="for",e})(),$p=class extends wd{constructor(i){super(),this.iteration=i}render(i){return`for(${this.iteration})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iteration=gn(this.iteration,i,t),this}get names(){return Sr(super.names,this.iteration.names)}},Lp=class extends wd{constructor(i,t,s,o){super(),this.varKind=i,this.name=t,this.from=s,this.to=o}render(i){let t=i.es5?xs.varKinds.var:this.varKind,{name:s,from:o,to:n}=this;return`for(${t} ${s}=${o}; ${s}<${n}; ${s}++)`+super.render(i)}get names(){let i=yd(super.names,this.from);return yd(i,this.to)}},bd=class extends wd{constructor(i,t,s,o){super(),this.loop=i,this.varKind=t,this.name=s,this.iterable=o}render(i){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iterable=gn(this.iterable,i,t),this}get names(){return Sr(super.names,this.iterable.names)}},ow=(()=>{class e extends po{constructor(t,s,o){super(),this.name=t,this.args=s,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),rw=(()=>{class e extends Na{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Gp=class extends po{render(i){let t="try"+super.render(i);return this.catch&&(t+=this.catch.render(i)),this.finally&&(t+=this.finally.render(i)),t}optimizeNodes(){var i,t;return super.optimizeNodes(),(i=this.catch)===null||i===void 0||i.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(i,t){var s,o;return super.optimizeNames(i,t),(s=this.catch)===null||s===void 0||s.optimizeNames(i,t),(o=this.finally)===null||o===void 0||o.optimizeNames(i,t),this}get names(){let i=super.names;return this.catch&&Sr(i,this.catch.names),this.finally&&Sr(i,this.finally.names),i}},nw=(()=>{class e extends po{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),aw=(()=>{class e extends po{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Wp=class{constructor(i,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=nt(ye({},t),{_n:t.lines?`
2
2
  `:""}),this._extScope=i,this._scope=new xs.Scope({parent:i}),this._nodes=[new Vp]}toString(){return this._root.render(this.opts)}name(i){return this._scope.name(i)}scopeName(i){return this._extScope.name(i)}scopeValue(i,t){let s=this._extScope.value(i,t);return(this._values[s.prefix]||(this._values[s.prefix]=new Set)).add(s),s}getScopeValue(i,t){return this._extScope.getValue(i,t)}scopeRefs(i){return this._extScope.scopeRefs(i,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(i,t,s,o){let n=this._scope.toName(t);return s!==void 0&&o&&(this._constants[n.str]=s),this._leafNode(new Mp(i,n,s)),n}const(i,t,s){return this._def(xs.varKinds.const,i,t,s)}let(i,t,s){return this._def(xs.varKinds.let,i,t,s)}var(i,t,s){return this._def(xs.varKinds.var,i,t,s)}assign(i,t,s){return this._leafNode(new fd(i,t,s))}add(i,t){return this._leafNode(new Up(i,Oe.operators.ADD,t))}code(i){return typeof i=="function"?i():i!==Je.nil&&this._leafNode(new qp(i)),this}object(...i){let t=["{"];for(let[s,o]of i)t.length>1&&t.push(","),t.push(s),(s!==o||this.opts.es5)&&(t.push(":"),(0,Je.addCodeArg)(t,o));return t.push("}"),new Je._Code(t)}if(i,t,s){if(this._blockNode(new _d(i)),t&&s)this.code(t).else().code(s).endIf();else if(t)this.code(t).endIf();else if(s)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(i){return this._elseNode(new _d(i))}else(){return this._elseNode(new Kp)}endIf(){return this._endBlockNode(_d,Kp)}_for(i,t){return this._blockNode(i),t&&this.code(t).endFor(),this}for(i,t){return this._for(new $p(i),t)}forRange(i,t,s,o,n=this.opts.es5?xs.varKinds.var:xs.varKinds.let){let l=this._scope.toName(i);return this._for(new Lp(n,l,t,s),()=>o(l))}forOf(i,t,s,o=xs.varKinds.const){let n=this._scope.toName(i);if(this.opts.es5){let l=t instanceof Je.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,Je._)`${l}.length`,c=>{this.var(n,(0,Je._)`${l}[${c}]`),s(n)})}return this._for(new bd("of",o,n,t),()=>s(n))}forIn(i,t,s,o=this.opts.es5?xs.varKinds.var:xs.varKinds.const){if(this.opts.ownProperties)return this.forOf(i,(0,Je._)`Object.keys(${t})`,s);let n=this._scope.toName(i);return this._for(new bd("in",o,n,t),()=>s(n))}endFor(){return this._endBlockNode(wd)}label(i){return this._leafNode(new Rp(i))}break(i){return this._leafNode(new Fp(i))}return(i){let t=new rw;if(this._blockNode(t),this.code(i),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(rw)}try(i,t,s){if(!t&&!s)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new Gp;if(this._blockNode(o),this.code(i),t){let n=this.name("e");this._currNode=o.catch=new nw(n),t(n)}return s&&(this._currNode=o.finally=new aw,this.code(s)),this._endBlockNode(nw,aw)}throw(i){return this._leafNode(new Op(i))}block(i,t){return this._blockStarts.push(this._nodes.length),i&&this.code(i).endBlock(t),this}endBlock(i){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let s=this._nodes.length-t;if(s<0||i!==void 0&&s!==i)throw new Error(`CodeGen: wrong number of nodes: ${s} vs ${i} expected`);return this._nodes.length=t,this}func(i,t=Je.nil,s,o){return this._blockNode(new ow(i,t,s)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(ow)}optimize(i=1){for(;i-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(i){return this._currNode.nodes.push(i),this}_blockNode(i){this._currNode.nodes.push(i),this._nodes.push(i)}_endBlockNode(i,t){let s=this._currNode;if(s instanceof i||t&&s instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${i.kind}/${t.kind}`:i.kind}"`)}_elseNode(i){let t=this._currNode;if(!(t instanceof _d))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=i,this}get _root(){return this._nodes[0]}get _currNode(){let i=this._nodes;return i[i.length-1]}set _currNode(i){let t=this._nodes;t[t.length-1]=i}};Oe.CodeGen=Wp;function Sr(e,i){for(let t in i)e[t]=(e[t]||0)+(i[t]||0);return e}function yd(e,i){return i instanceof Je._CodeOrName?Sr(e,i.names):e}function gn(e,i,t){if(e instanceof Je.Name)return s(e);if(!o(e))return e;return new Je._Code(e._items.reduce((n,l)=>(l instanceof Je.Name&&(l=s(l)),l instanceof Je._Code?n.push(...l._items):n.push(l),n),[]));function s(n){let l=t[n.str];return l===void 0||i[n.str]!==1?n:(delete i[n.str],l)}function o(n){return n instanceof Je._Code&&n._items.some(l=>l instanceof Je.Name&&i[l.str]===1&&t[l.str]!==void 0)}}function UR(e,i){for(let t in i)e[t]=(e[t]||0)-(i[t]||0)}function lw(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,Je._)`!${Yp(e)}`}Oe.not=lw;var RR=cw(Oe.operators.AND);function FR(...e){return e.reduce(RR)}Oe.and=FR;var OR=cw(Oe.operators.OR);function qR(...e){return e.reduce(OR)}Oe.or=qR;function cw(e){return(i,t)=>i===Je.nil?t:t===Je.nil?i:(0,Je._)`${Yp(i)} ${e} ${Yp(t)}`}function Yp(e){return e instanceof Je.Name?e:(0,Je._)`(${e})`}});var $e=w(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.checkStrictMode=Ve.getErrorPath=Ve.Type=Ve.useFunc=Ve.setEvaluated=Ve.evaluatedPropsToName=Ve.mergeEvaluated=Ve.eachItem=Ve.unescapeJsonPointer=Ve.escapeJsonPointer=Ve.escapeFragment=Ve.unescapeFragment=Ve.schemaRefOrVal=Ve.schemaHasRulesButRef=Ve.schemaHasRules=Ve.checkUnknownRules=Ve.alwaysValidSchema=Ve.toHash=void 0;var ft=ke(),VR=ja();function KR(e){let i={};for(let t of e)i[t]=!0;return i}Ve.toHash=KR;function $R(e,i){return typeof i=="boolean"?i:Object.keys(i).length===0?!0:(gw(e,i),!pw(i,e.self.RULES.all))}Ve.alwaysValidSchema=$R;function gw(e,i=e.schema){let{opts:t,self:s}=e;if(!t.strictSchema||typeof i=="boolean")return;let o=s.RULES.keywords;for(let n in i)o[n]||_w(e,`unknown keyword: "${n}"`)}Ve.checkUnknownRules=gw;function pw(e,i){if(typeof e=="boolean")return!e;for(let t in e)if(i[t])return!0;return!1}Ve.schemaHasRules=pw;function LR(e,i){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&i.all[t])return!0;return!1}Ve.schemaHasRulesButRef=LR;function GR({topSchemaRef:e,schemaPath:i},t,s,o){if(!o){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,ft._)`${t}`}return(0,ft._)`${e}${i}${(0,ft.getProperty)(s)}`}Ve.schemaRefOrVal=GR;function WR(e){return mw(decodeURIComponent(e))}Ve.unescapeFragment=WR;function YR(e){return encodeURIComponent(Zp(e))}Ve.escapeFragment=YR;function Zp(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}Ve.escapeJsonPointer=Zp;function mw(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Ve.unescapeJsonPointer=mw;function JR(e,i){if(Array.isArray(e))for(let t of e)i(t);else i(e)}Ve.eachItem=JR;function dw({mergeNames:e,mergeToName:i,mergeValues:t,resultToName:s}){return(o,n,l,c)=>{let u=l===void 0?n:l instanceof ft.Name?(n instanceof ft.Name?e(o,n,l):i(o,n,l),l):n instanceof ft.Name?(i(o,l,n),n):t(n,l);return c===ft.Name&&!(u instanceof ft.Name)?s(o,u):u}}Ve.mergeEvaluated={props:dw({mergeNames:(e,i,t)=>e.if((0,ft._)`${t} !== true && ${i} !== undefined`,()=>{e.if((0,ft._)`${i} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,ft._)`${t} || {}`).code((0,ft._)`Object.assign(${t}, ${i})`))}),mergeToName:(e,i,t)=>e.if((0,ft._)`${t} !== true`,()=>{i===!0?e.assign(t,!0):(e.assign(t,(0,ft._)`${t} || {}`),Qp(e,t,i))}),mergeValues:(e,i)=>e===!0?!0:ye(ye({},e),i),resultToName:hw}),items:dw({mergeNames:(e,i,t)=>e.if((0,ft._)`${t} !== true && ${i} !== undefined`,()=>e.assign(t,(0,ft._)`${i} === true ? true : ${t} > ${i} ? ${t} : ${i}`)),mergeToName:(e,i,t)=>e.if((0,ft._)`${t} !== true`,()=>e.assign(t,i===!0?!0:(0,ft._)`${t} > ${i} ? ${t} : ${i}`)),mergeValues:(e,i)=>e===!0?!0:Math.max(e,i),resultToName:(e,i)=>e.var("items",i)})};function hw(e,i){if(i===!0)return e.var("props",!0);let t=e.var("props",(0,ft._)`{}`);return i!==void 0&&Qp(e,t,i),t}Ve.evaluatedPropsToName=hw;function Qp(e,i,t){Object.keys(t).forEach(s=>e.assign((0,ft._)`${i}${(0,ft.getProperty)(s)}`,!0))}Ve.setEvaluated=Qp;var uw={};function ZR(e,i){return e.scopeValue("func",{ref:i,code:uw[i.code]||(uw[i.code]=new VR._Code(i.code))})}Ve.useFunc=ZR;var Jp=(function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e})(Jp||(Ve.Type=Jp={}));function QR(e,i,t){if(e instanceof ft.Name){let s=i===Jp.Num;return t?s?(0,ft._)`"[" + ${e} + "]"`:(0,ft._)`"['" + ${e} + "']"`:s?(0,ft._)`"/" + ${e}`:(0,ft._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,ft.getProperty)(e).toString():"/"+Zp(e)}Ve.getErrorPath=QR;function _w(e,i,t=e.opts.strictSchema){if(t){if(i=`strict mode: ${i}`,t===!0)throw new Error(i);e.self.logger.warn(i)}}Ve.checkStrictMode=_w});var us=w(Xp=>{"use strict";Object.defineProperty(Xp,"__esModule",{value:!0});var di=ke(),XR={data:new di.Name("data"),valCxt:new di.Name("valCxt"),instancePath:new di.Name("instancePath"),parentData:new di.Name("parentData"),parentDataProperty:new di.Name("parentDataProperty"),rootData:new di.Name("rootData"),dynamicAnchors:new di.Name("dynamicAnchors"),vErrors:new di.Name("vErrors"),errors:new di.Name("errors"),this:new di.Name("this"),self:new di.Name("self"),scope:new di.Name("scope"),json:new di.Name("json"),jsonPos:new di.Name("jsonPos"),jsonLen:new di.Name("jsonLen"),jsonPart:new di.Name("jsonPart")};Xp.default=XR});var Da=w(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.extendErrors=ui.resetErrorsCount=ui.reportExtraError=ui.reportError=ui.keyword$DataError=ui.keywordError=void 0;var Qe=ke(),kd=$e(),Ci=us();ui.keywordError={message:({keyword:e})=>(0,Qe.str)`must pass "${e}" keyword validation`};ui.keyword$DataError={message:({keyword:e,schemaType:i})=>i?(0,Qe.str)`"${e}" keyword must be ${i} ($data)`:(0,Qe.str)`"${e}" keyword is invalid ($data)`};function eF(e,i=ui.keywordError,t,s){let{it:o}=e,{gen:n,compositeRule:l,allErrors:c}=o,u=yw(e,i,t);s??(l||c)?fw(n,u):bw(o,(0,Qe._)`[${u}]`)}ui.reportError=eF;function tF(e,i=ui.keywordError,t){let{it:s}=e,{gen:o,compositeRule:n,allErrors:l}=s,c=yw(e,i,t);fw(o,c),n||l||bw(s,Ci.default.vErrors)}ui.reportExtraError=tF;function iF(e,i){e.assign(Ci.default.errors,i),e.if((0,Qe._)`${Ci.default.vErrors} !== null`,()=>e.if(i,()=>e.assign((0,Qe._)`${Ci.default.vErrors}.length`,i),()=>e.assign(Ci.default.vErrors,null)))}ui.resetErrorsCount=iF;function sF({gen:e,keyword:i,schemaValue:t,data:s,errsCount:o,it:n}){if(o===void 0)throw new Error("ajv implementation error");let l=e.name("err");e.forRange("i",o,Ci.default.errors,c=>{e.const(l,(0,Qe._)`${Ci.default.vErrors}[${c}]`),e.if((0,Qe._)`${l}.instancePath === undefined`,()=>e.assign((0,Qe._)`${l}.instancePath`,(0,Qe.strConcat)(Ci.default.instancePath,n.errorPath))),e.assign((0,Qe._)`${l}.schemaPath`,(0,Qe.str)`${n.errSchemaPath}/${i}`),n.opts.verbose&&(e.assign((0,Qe._)`${l}.schema`,t),e.assign((0,Qe._)`${l}.data`,s))})}ui.extendErrors=sF;function fw(e,i){let t=e.const("err",i);e.if((0,Qe._)`${Ci.default.vErrors} === null`,()=>e.assign(Ci.default.vErrors,(0,Qe._)`[${t}]`),(0,Qe._)`${Ci.default.vErrors}.push(${t})`),e.code((0,Qe._)`${Ci.default.errors}++`)}function bw(e,i){let{gen:t,validateName:s,schemaEnv:o}=e;o.$async?t.throw((0,Qe._)`new ${e.ValidationError}(${i})`):(t.assign((0,Qe._)`${s}.errors`,i),t.return(!1))}var Cr={keyword:new Qe.Name("keyword"),schemaPath:new Qe.Name("schemaPath"),params:new Qe.Name("params"),propertyName:new Qe.Name("propertyName"),message:new Qe.Name("message"),schema:new Qe.Name("schema"),parentSchema:new Qe.Name("parentSchema")};function yw(e,i,t){let{createErrors:s}=e.it;return s===!1?(0,Qe._)`{}`:oF(e,i,t)}function oF(e,i,t={}){let{gen:s,it:o}=e,n=[rF(o,t),nF(e,t)];return aF(e,i,n),s.object(...n)}function rF({errorPath:e},{instancePath:i}){let t=i?(0,Qe.str)`${e}${(0,kd.getErrorPath)(i,kd.Type.Str)}`:e;return[Ci.default.instancePath,(0,Qe.strConcat)(Ci.default.instancePath,t)]}function nF({keyword:e,it:{errSchemaPath:i}},{schemaPath:t,parentSchema:s}){let o=s?i:(0,Qe.str)`${i}/${e}`;return t&&(o=(0,Qe.str)`${o}${(0,kd.getErrorPath)(t,kd.Type.Str)}`),[Cr.schemaPath,o]}function aF(e,{params:i,message:t},s){let{keyword:o,data:n,schemaValue:l,it:c}=e,{opts:u,propertyName:p,topSchemaRef:h,schemaPath:f}=c;s.push([Cr.keyword,o],[Cr.params,typeof i=="function"?i(e):i||(0,Qe._)`{}`]),u.messages&&s.push([Cr.message,typeof t=="function"?t(e):t]),u.verbose&&s.push([Cr.schema,l],[Cr.parentSchema,(0,Qe._)`${h}${f}`],[Ci.default.data,n]),p&&s.push([Cr.propertyName,p])}});var ww=w(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.boolOrEmptySchema=pn.topBoolOrEmptySchema=void 0;var lF=Da(),cF=ke(),dF=us(),uF={message:"boolean schema is false"};function gF(e){let{gen:i,schema:t,validateName:s}=e;t===!1?vw(e,!1):typeof t=="object"&&t.$async===!0?i.return(dF.default.data):(i.assign((0,cF._)`${s}.errors`,null),i.return(!0))}pn.topBoolOrEmptySchema=gF;function pF(e,i){let{gen:t,schema:s}=e;s===!1?(t.var(i,!1),vw(e)):t.var(i,!0)}pn.boolOrEmptySchema=pF;function vw(e,i){let{gen:t,data:s}=e,o={gen:t,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,lF.reportError)(o,uF,void 0,i)}});var em=w(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.getRules=mn.isJSONType=void 0;var mF=["string","number","integer","boolean","null","object","array"],hF=new Set(mF);function _F(e){return typeof e=="string"&&hF.has(e)}mn.isJSONType=_F;function fF(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:nt(ye({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}mn.getRules=fF});var tm=w(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.shouldUseRule=Wo.shouldUseGroup=Wo.schemaHasRulesForType=void 0;function bF({schema:e,self:i},t){let s=i.RULES.types[t];return s&&s!==!0&&kw(e,s)}Wo.schemaHasRulesForType=bF;function kw(e,i){return i.rules.some(t=>Hw(e,t))}Wo.shouldUseGroup=kw;function Hw(e,i){var t;return e[i.keyword]!==void 0||((t=i.definition.implements)===null||t===void 0?void 0:t.some(s=>e[s]!==void 0))}Wo.shouldUseRule=Hw});var Ba=w(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.reportTypeError=gi.checkDataTypes=gi.checkDataType=gi.coerceAndCheckDataType=gi.getJSONTypes=gi.getSchemaTypes=gi.DataType=void 0;var yF=em(),vF=tm(),wF=Da(),Me=ke(),Sw=$e(),hn=(function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e})(hn||(gi.DataType=hn={}));function kF(e){let i=Cw(e.type);if(i.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!i.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&i.push("null")}return i}gi.getSchemaTypes=kF;function Cw(e){let i=Array.isArray(e)?e:e?[e]:[];if(i.every(yF.isJSONType))return i;throw new Error("type must be JSONType or JSONType[]: "+i.join(","))}gi.getJSONTypes=Cw;function HF(e,i){let{gen:t,data:s,opts:o}=e,n=SF(i,o.coerceTypes),l=i.length>0&&!(n.length===0&&i.length===1&&(0,vF.schemaHasRulesForType)(e,i[0]));if(l){let c=sm(i,s,o.strictNumbers,hn.Wrong);t.if(c,()=>{n.length?CF(e,i,n):om(e)})}return l}gi.coerceAndCheckDataType=HF;var xw=new Set(["string","number","integer","boolean","null"]);function SF(e,i){return i?e.filter(t=>xw.has(t)||i==="array"&&t==="array"):[]}function CF(e,i,t){let{gen:s,data:o,opts:n}=e,l=s.let("dataType",(0,Me._)`typeof ${o}`),c=s.let("coerced",(0,Me._)`undefined`);n.coerceTypes==="array"&&s.if((0,Me._)`${l} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>s.assign(o,(0,Me._)`${o}[0]`).assign(l,(0,Me._)`typeof ${o}`).if(sm(i,o,n.strictNumbers),()=>s.assign(c,o))),s.if((0,Me._)`${c} !== undefined`);for(let p of t)(xw.has(p)||p==="array"&&n.coerceTypes==="array")&&u(p);s.else(),om(e),s.endIf(),s.if((0,Me._)`${c} !== undefined`,()=>{s.assign(o,c),xF(e,c)});function u(p){switch(p){case"string":s.elseIf((0,Me._)`${l} == "number" || ${l} == "boolean"`).assign(c,(0,Me._)`"" + ${o}`).elseIf((0,Me._)`${o} === null`).assign(c,(0,Me._)`""`);return;case"number":s.elseIf((0,Me._)`${l} == "boolean" || ${o} === null
3
3
  || (${l} == "string" && ${o} && ${o} == +${o})`).assign(c,(0,Me._)`+${o}`);return;case"integer":s.elseIf((0,Me._)`${l} === "boolean" || ${o} === null
4
4
  || (${l} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(c,(0,Me._)`+${o}`);return;case"boolean":s.elseIf((0,Me._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(c,!1).elseIf((0,Me._)`${o} === "true" || ${o} === 1`).assign(c,!0);return;case"null":s.elseIf((0,Me._)`${o} === "" || ${o} === 0 || ${o} === false`),s.assign(c,null);return;case"array":s.elseIf((0,Me._)`${l} === "string" || ${l} === "number"
@@ -1 +1 @@
1
- import{d as u,g as n}from"./chunk-YMAWYUA6.js";import{k as f,n as l,q as d}from"./chunk-7KLW5GIG.js";import{Xa as s,ea as p,fa as i,h as m,ja as o,w as c}from"./chunk-V2XN5VIX.js";var a=(()=>{class r{$api=o(d);$router=o(u);$toastr=o(l);$translate=o(f);resolve(){return m(this,null,function*(){try{return yield c(this.$api.get("/users"))}catch(t){console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error")),this.$router.navigate(["/"])}})}static \u0275fac=function(e){return new(e||r)};static \u0275prov=p({token:r,factory:r.\u0275fac})}return r})();var h=[{path:"",loadComponent:()=>import("./chunk-GH4JGNJN.js").then(r=>r.UsersComponent),resolve:{homebridgeUsers:a}}],g=(()=>{class r{static \u0275fac=function(e){return new(e||r)};static \u0275mod=s({type:r});static \u0275inj=i({imports:[n.forChild(h),n]})}return r})();var T=(()=>{class r{static \u0275fac=function(e){return new(e||r)};static \u0275mod=s({type:r});static \u0275inj=i({providers:[a],imports:[g]})}return r})();export{T as UsersModule};
1
+ import{d as u,g as n}from"./chunk-YMAWYUA6.js";import{k as f,n as l,q as d}from"./chunk-KWFXAMYZ.js";import{Xa as s,ea as p,fa as i,h as m,ja as o,w as c}from"./chunk-V2XN5VIX.js";var a=(()=>{class r{$api=o(d);$router=o(u);$toastr=o(l);$translate=o(f);resolve(){return m(this,null,function*(){try{return yield c(this.$api.get("/users"))}catch(t){console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error")),this.$router.navigate(["/"])}})}static \u0275fac=function(e){return new(e||r)};static \u0275prov=p({token:r,factory:r.\u0275fac})}return r})();var h=[{path:"",loadComponent:()=>import("./chunk-KWZSOR47.js").then(r=>r.UsersComponent),resolve:{homebridgeUsers:a}}],g=(()=>{class r{static \u0275fac=function(e){return new(e||r)};static \u0275mod=s({type:r});static \u0275inj=i({imports:[n.forChild(h),n]})}return r})();var T=(()=>{class r{static \u0275fac=function(e){return new(e||r)};static \u0275mod=s({type:r});static \u0275inj=i({providers:[a],imports:[g]})}return r})();export{T as UsersModule};
@@ -1 +1 @@
1
- import{d as n}from"./chunk-YMAWYUA6.js";import{b as s}from"./chunk-HPUVHUIE.js";import{ea as o,h as r,ja as e,w as i}from"./chunk-V2XN5VIX.js";var l=(()=>{class t{$router=e(n);$settings=e(s);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-YMAWYUA6.js";import{b as s}from"./chunk-Y6PTF4YJ.js";import{ea as o,h as r,ja as e,w as i}from"./chunk-V2XN5VIX.js";var l=(()=>{class t{$router=e(n);$settings=e(s);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{b as y}from"./chunk-HPUVHUIE.js";import{l as I,p as w}from"./chunk-7KLW5GIG.js";import{Gb as h,Ha as _,Ib as B,Kc as E,La as e,Vb as r,Wa as k,Wb as m,Xb as l,hc as x,ja as S,kb as s,lb as f,mb as g,mc as i,nc as n,rb as v,sb as t,tb as a,ub as p}from"./chunk-V2XN5VIX.js";var C=(o,b)=>({"fa-chevron-down":o,"fa-chevron-right":b});function T(o,b){o&1&&(t(0,"ul",6)(1,"li",9)(2,"span",10),r(3),i(4,"translate"),p(5,"br"),t(6,"small",11),r(7),i(8,"translate"),a()(),t(9,"a",12),i(10,"translate"),p(11,"i",13),a()(),t(12,"li",9)(13,"span",10),r(14),i(15,"translate"),p(16,"br"),t(17,"small",11),r(18),i(19,"translate"),a()(),t(20,"a",14),i(21,"translate"),p(22,"i",13),a()(),t(23,"li",9)(24,"span",10),r(25),i(26,"translate"),p(27,"br"),t(28,"small",11),r(29),i(30,"translate"),a()(),t(31,"a",15),i(32,"translate"),p(33,"i",13),a()(),t(34,"li",9)(35,"span",10),r(36),i(37,"translate"),p(38,"br"),t(39,"small",11),r(40),i(41,"translate"),a()(),t(42,"a",16),i(43,"translate"),p(44,"i",13),a()()()),o&2&&(e(3),l(" ",n(4,12,"support.links.documentation")),e(4),m(n(8,14,"support.links.documentation_sub")),e(2),s("aria-label",n(10,16,"support.links.documentation")),e(5),l(" ",n(15,18,"support.links.issue")),e(4),m(n(19,20,"support.links.issue_sub")),e(2),s("aria-label",n(21,22,"support.links.issue")),e(5),l(" ",n(26,24,"support.links.discord")),e(4),m(n(30,26,"support.links.discord_sub")),e(2),s("aria-label",n(32,28,"support.links.discord")),e(5),l(" ",n(37,30,"support.links.reddit")),e(4),m(n(41,32,"support.links.reddit_sub")),e(2),s("aria-label",n(43,34,"support.links.reddit")))}function $(o,b){if(o&1&&(t(0,"ul",8)(1,"li",9)(2,"span",10),r(3),i(4,"translate"),p(5,"br"),t(6,"small",11),r(7),i(8,"translate"),a()(),t(9,"a",17),i(10,"translate"),p(11,"i",13),a()(),t(12,"li",9)(13,"span",10),r(14),i(15,"translate"),p(16,"br"),t(17,"small",11),r(18),i(19,"translate"),a()(),t(20,"a",18),i(21,"translate"),p(22,"i",13),a()(),t(23,"li",9)(24,"span",10),r(25),i(26,"translate"),p(27,"br"),t(28,"small",11),r(29),i(30,"translate"),a()(),t(31,"a",19),i(32,"translate"),p(33,"i",13),a()(),t(34,"li",9)(35,"span",10),r(36),i(37,"translate"),p(38,"br"),t(39,"small",11),r(40),i(41,"translate"),a()(),t(42,"a",20),i(43,"translate"),p(44,"i",13),a()(),t(45,"li",9)(46,"span",10),r(47),i(48,"translate"),p(49,"br"),t(50,"small",11),r(51),i(52,"translate"),a()(),t(53,"a",21),i(54,"translate"),p(55,"i",13),a()()()),o&2){let u=B();e(3),l(" ",n(4,16,"support.dev.item_swagger")),e(4),l(" ",n(8,18,"support.dev.item_swagger_sub")," "),e(2),v("href",u.swaggerUrl,_),s("aria-label",n(10,20,"support.dev.item_swagger")),e(5),l(" ",n(15,22,"support.dev.api")),e(4),m(n(19,24,"support.dev.api_sub")),e(2),s("aria-label",n(21,26,"support.dev.api")),e(5),l(" ",n(26,28,"support.dev.api_hap")),e(4),m(n(30,30,"support.dev.api_hap_sub")),e(2),s("aria-label",n(32,32,"support.dev.api_hap")),e(5),l(" ",n(37,34,"support.dev.template")),e(4),l(" ",n(41,36,"support.dev.template_sub")," "),e(2),s("aria-label",n(43,38,"support.dev.template")),e(5),l(" ",n(48,40,"support.dev.verified")),e(4),m(n(52,42,"support.dev.verified_sub")),e(2),s("aria-label",n(54,44,"support.dev.verified"))}}var q=(()=>{class o{$settings=S(y);swaggerEndpoint="/swagger";showFields={general:!0,dev:!0};get swaggerUrl(){return w.production?`${this.$settings.webroot}${this.swaggerEndpoint}`:`${w.api.origin}${this.swaggerEndpoint}`}toggleSection(u){this.showFields[u]=!this.showFields[u]}static \u0275fac=function(c){return new(c||o)};static \u0275cmp=k({type:o,selectors:[["ng-component"]],decls:18,vars:23,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"mb-4"],["role","button","tabindex","0",1,"mt-3","hover-pointer",3,"click"],[1,"primary-text"],[1,"fa","fa-fw",3,"ngClass"],["id","fieldsGeneral",1,"list-group","list-group-box","mt-2","mx-0"],[1,"pb-3"],["id","fieldsDev",1,"list-group","list-group-box","mt-2","mx-0"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"pe-2"],[1,"grey-text","pe-2"],["href","https://github.com/homebridge/homebridge/wiki","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],[1,"fas","fa-fw","fa-external-link-alt"],["href","https://github.com/homebridge/homebridge-config-ui-x/issues/new/choose","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["href","https://discord.gg/C87Pvq3","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["href","https://www.reddit.com/r/homebridge/","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px",3,"href"],["href","https://developers.homebridge.io/#/","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["href","https://developers.homebridge.io/HAP-NodeJS/","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["href","https://github.com/homebridge/homebridge-plugin-template","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["href","https://github.com/homebridge/homebridge/wiki/Verified-Plugins","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"]],template:function(c,d){c&1&&(t(0,"div",0)(1,"h3",1),r(2),i(3,"translate"),a()(),t(4,"div",2)(5,"div",3),h("click",function(){return d.toggleSection("general")}),t(6,"h5",4),p(7,"i",5),r(8),i(9,"translate"),a()(),f(10,T,45,36,"ul",6),a(),t(11,"div",7)(12,"div",3),h("click",function(){return d.toggleSection("dev")}),t(13,"h5",4),p(14,"i",5),r(15),i(16,"translate"),a()(),f(17,$,56,46,"ul",8),a()),c&2&&(e(2),m(n(3,11,"support.title")),e(3),s("aria-expanded",d.showFields.general?"true":"false")("aria-controls","fieldsGeneral"),e(2),v("ngClass",x(17,C,d.showFields.general,!d.showFields.general)),e(),l(" ",n(9,13,"support.links.title")," "),e(2),g(d.showFields.general?10:-1),e(2),s("aria-expanded",d.showFields.dev?"true":"false")("aria-controls","fieldsDev"),e(2),v("ngClass",x(20,C,d.showFields.dev,!d.showFields.dev)),e(),l(" ",n(16,15,"support.dev.title")," "),e(2),g(d.showFields.dev?17:-1))},dependencies:[E,I],encapsulation:2})}return o})();export{q as SupportComponent};
1
+ import{b as y}from"./chunk-Y6PTF4YJ.js";import{l as I,p as w}from"./chunk-KWFXAMYZ.js";import{Gb as h,Ha as _,Ib as B,Kc as E,La as e,Vb as r,Wa as k,Wb as m,Xb as l,hc as x,ja as S,kb as s,lb as f,mb as g,mc as i,nc as n,rb as v,sb as t,tb as a,ub as p}from"./chunk-V2XN5VIX.js";var C=(o,b)=>({"fa-chevron-down":o,"fa-chevron-right":b});function T(o,b){o&1&&(t(0,"ul",6)(1,"li",9)(2,"span",10),r(3),i(4,"translate"),p(5,"br"),t(6,"small",11),r(7),i(8,"translate"),a()(),t(9,"a",12),i(10,"translate"),p(11,"i",13),a()(),t(12,"li",9)(13,"span",10),r(14),i(15,"translate"),p(16,"br"),t(17,"small",11),r(18),i(19,"translate"),a()(),t(20,"a",14),i(21,"translate"),p(22,"i",13),a()(),t(23,"li",9)(24,"span",10),r(25),i(26,"translate"),p(27,"br"),t(28,"small",11),r(29),i(30,"translate"),a()(),t(31,"a",15),i(32,"translate"),p(33,"i",13),a()(),t(34,"li",9)(35,"span",10),r(36),i(37,"translate"),p(38,"br"),t(39,"small",11),r(40),i(41,"translate"),a()(),t(42,"a",16),i(43,"translate"),p(44,"i",13),a()()()),o&2&&(e(3),l(" ",n(4,12,"support.links.documentation")),e(4),m(n(8,14,"support.links.documentation_sub")),e(2),s("aria-label",n(10,16,"support.links.documentation")),e(5),l(" ",n(15,18,"support.links.issue")),e(4),m(n(19,20,"support.links.issue_sub")),e(2),s("aria-label",n(21,22,"support.links.issue")),e(5),l(" ",n(26,24,"support.links.discord")),e(4),m(n(30,26,"support.links.discord_sub")),e(2),s("aria-label",n(32,28,"support.links.discord")),e(5),l(" ",n(37,30,"support.links.reddit")),e(4),m(n(41,32,"support.links.reddit_sub")),e(2),s("aria-label",n(43,34,"support.links.reddit")))}function $(o,b){if(o&1&&(t(0,"ul",8)(1,"li",9)(2,"span",10),r(3),i(4,"translate"),p(5,"br"),t(6,"small",11),r(7),i(8,"translate"),a()(),t(9,"a",17),i(10,"translate"),p(11,"i",13),a()(),t(12,"li",9)(13,"span",10),r(14),i(15,"translate"),p(16,"br"),t(17,"small",11),r(18),i(19,"translate"),a()(),t(20,"a",18),i(21,"translate"),p(22,"i",13),a()(),t(23,"li",9)(24,"span",10),r(25),i(26,"translate"),p(27,"br"),t(28,"small",11),r(29),i(30,"translate"),a()(),t(31,"a",19),i(32,"translate"),p(33,"i",13),a()(),t(34,"li",9)(35,"span",10),r(36),i(37,"translate"),p(38,"br"),t(39,"small",11),r(40),i(41,"translate"),a()(),t(42,"a",20),i(43,"translate"),p(44,"i",13),a()(),t(45,"li",9)(46,"span",10),r(47),i(48,"translate"),p(49,"br"),t(50,"small",11),r(51),i(52,"translate"),a()(),t(53,"a",21),i(54,"translate"),p(55,"i",13),a()()()),o&2){let u=B();e(3),l(" ",n(4,16,"support.dev.item_swagger")),e(4),l(" ",n(8,18,"support.dev.item_swagger_sub")," "),e(2),v("href",u.swaggerUrl,_),s("aria-label",n(10,20,"support.dev.item_swagger")),e(5),l(" ",n(15,22,"support.dev.api")),e(4),m(n(19,24,"support.dev.api_sub")),e(2),s("aria-label",n(21,26,"support.dev.api")),e(5),l(" ",n(26,28,"support.dev.api_hap")),e(4),m(n(30,30,"support.dev.api_hap_sub")),e(2),s("aria-label",n(32,32,"support.dev.api_hap")),e(5),l(" ",n(37,34,"support.dev.template")),e(4),l(" ",n(41,36,"support.dev.template_sub")," "),e(2),s("aria-label",n(43,38,"support.dev.template")),e(5),l(" ",n(48,40,"support.dev.verified")),e(4),m(n(52,42,"support.dev.verified_sub")),e(2),s("aria-label",n(54,44,"support.dev.verified"))}}var q=(()=>{class o{$settings=S(y);swaggerEndpoint="/swagger";showFields={general:!0,dev:!0};get swaggerUrl(){return w.production?`${this.$settings.webroot}${this.swaggerEndpoint}`:`${w.api.origin}${this.swaggerEndpoint}`}toggleSection(u){this.showFields[u]=!this.showFields[u]}static \u0275fac=function(c){return new(c||o)};static \u0275cmp=k({type:o,selectors:[["ng-component"]],decls:18,vars:23,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"mb-4"],["role","button","tabindex","0",1,"mt-3","hover-pointer",3,"click"],[1,"primary-text"],[1,"fa","fa-fw",3,"ngClass"],["id","fieldsGeneral",1,"list-group","list-group-box","mt-2","mx-0"],[1,"pb-3"],["id","fieldsDev",1,"list-group","list-group-box","mt-2","mx-0"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"pe-2"],[1,"grey-text","pe-2"],["href","https://github.com/homebridge/homebridge/wiki","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],[1,"fas","fa-fw","fa-external-link-alt"],["href","https://github.com/homebridge/homebridge-config-ui-x/issues/new/choose","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["href","https://discord.gg/C87Pvq3","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["href","https://www.reddit.com/r/homebridge/","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px",3,"href"],["href","https://developers.homebridge.io/#/","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["href","https://developers.homebridge.io/HAP-NodeJS/","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["href","https://github.com/homebridge/homebridge-plugin-template","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["href","https://github.com/homebridge/homebridge/wiki/Verified-Plugins","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"]],template:function(c,d){c&1&&(t(0,"div",0)(1,"h3",1),r(2),i(3,"translate"),a()(),t(4,"div",2)(5,"div",3),h("click",function(){return d.toggleSection("general")}),t(6,"h5",4),p(7,"i",5),r(8),i(9,"translate"),a()(),f(10,T,45,36,"ul",6),a(),t(11,"div",7)(12,"div",3),h("click",function(){return d.toggleSection("dev")}),t(13,"h5",4),p(14,"i",5),r(15),i(16,"translate"),a()(),f(17,$,56,46,"ul",8),a()),c&2&&(e(2),m(n(3,11,"support.title")),e(3),s("aria-expanded",d.showFields.general?"true":"false")("aria-controls","fieldsGeneral"),e(2),v("ngClass",x(17,C,d.showFields.general,!d.showFields.general)),e(),l(" ",n(9,13,"support.links.title")," "),e(2),g(d.showFields.general?10:-1),e(2),s("aria-expanded",d.showFields.dev?"true":"false")("aria-controls","fieldsDev"),e(2),v("ngClass",x(20,C,d.showFields.dev,!d.showFields.dev)),e(),l(" ",n(16,15,"support.dev.title")," "),e(2),g(d.showFields.dev?17:-1))},dependencies:[E,I],encapsulation:2})}return o})();export{q as SupportComponent};
@@ -1 +1 @@
1
- import{k as tt,n as et,q as it}from"./chunk-7KLW5GIG.js";import{T as G,e as ut,ea as R,g as ct,h as P,hd as X,ja as Y,n as Q,w as N}from"./chunk-V2XN5VIX.js";var st=ut((J,K)=>{(function(b,D){typeof J=="object"&&typeof K<"u"?K.exports=D():typeof define=="function"&&define.amd?define(D):(b=typeof globalThis<"u"?globalThis:b||self).dayjs=D()})(J,function(){"use strict";var b=1e3,D=6e4,n=36e5,h="millisecond",d="second",m="minute",M="hour",v="day",f="week",L="month",B="quarter",S="year",_="date",E="Invalid Date",nt=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,rt=/\[([^\]]+)]|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,ot={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 s=String(r);return!s||s.length>=i?r:""+Array(i+1-s.length).join(t)+r},at={s:F,z:function(r){var i=-r.utcOffset(),t=Math.abs(i),s=Math.floor(t/60),e=t%60;return(i<=0?"+":"-")+F(s,2,"0")+":"+F(e,2,"0")},m:function r(i,t){if(i.date()<t.date())return-r(t,i);var s=12*(t.year()-i.year())+(t.month()-i.month()),e=i.clone().add(s,L),o=t-e<0,a=i.clone().add(s+(o?-1:1),L);return+(-(s+(t-e)/(o?e-a:a-e))||0)},a:function(r){return r<0?Math.ceil(r)||0:Math.floor(r)},p:function(r){return{M:L,y:S,w:f,d:v,D:_,h:M,m,s:d,ms:h,Q:B}[r]||String(r||"").toLowerCase().replace(/s$/,"")},u:function(r){return r===void 0}},j="en",T={};T[j]=ot;var Z="$isDayjsObject",U=function(r){return r instanceof C||!(!r||!r[Z])},W=function r(i,t,s){var e;if(!i)return j;if(typeof i=="string"){var o=i.toLowerCase();T[o]&&(e=o),t&&(T[o]=t,e=o);var a=i.split("-");if(!e&&a.length>1)return r(a[0])}else{var c=i.name;T[c]=i,e=c}return!s&&e&&(j=e),e||!s&&j},g=function(r,i){if(U(r))return r.clone();var t=typeof i=="object"?i:{};return t.date=r,t.args=arguments,new C(t)},u=at;u.l=W,u.i=U,u.w=function(r,i){return g(r,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var C=(function(){function r(t){this.$L=W(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[Z]=!0}var i=r.prototype;return i.parse=function(t){this.$d=(function(s){var e=s.date,o=s.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(nt);if(a){var c=a[2]-1||0,l=(a[7]||"0").substring(0,3);return o?new Date(Date.UTC(a[1],c,a[3]||1,a[4]||0,a[5]||0,a[6]||0,l)):new Date(a[1],c,a[3]||1,a[4]||0,a[5]||0,a[6]||0,l)}}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()!==E},i.isSame=function(t,s){var e=g(t);return this.startOf(s)<=e&&e<=this.endOf(s)},i.isAfter=function(t,s){return g(t)<this.startOf(s)},i.isBefore=function(t,s){return this.endOf(s)<g(t)},i.$g=function(t,s,e){return u.u(t)?this[s]:this.set(e,t)},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this.$d.getTime()},i.startOf=function(t,s){var e=this,o=!!u.u(s)||s,a=u.p(t),c=function(x,y){var k=u.w(e.$u?Date.UTC(e.$y,y,x):new Date(e.$y,y,x),e);return o?k:k.endOf(v)},l=function(x,y){return u.w(e.toDate()[x].apply(e.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(y)),e)},$=this.$W,p=this.$M,w=this.$D,H="set"+(this.$u?"UTC":"");switch(a){case S:return o?c(1,0):c(31,11);case L:return o?c(1,p):c(0,p+1);case f:var O=this.$locale().weekStart||0,A=($<O?$+7:$)-O;return c(o?w-A:w+(6-A),p);case v:case _:return l(H+"Hours",0);case M:return l(H+"Minutes",1);case m:return l(H+"Seconds",2);case d:return l(H+"Milliseconds",3);default:return this.clone()}},i.endOf=function(t){return this.startOf(t,!1)},i.$set=function(t,s){var e,o=u.p(t),a="set"+(this.$u?"UTC":""),c=(e={},e[v]=a+"Date",e[_]=a+"Date",e[L]=a+"Month",e[S]=a+"FullYear",e[M]=a+"Hours",e[m]=a+"Minutes",e[d]=a+"Seconds",e[h]=a+"Milliseconds",e)[o],l=o===v?this.$D+(s-this.$W):s;if(o===L||o===S){var $=this.clone().set(_,1);$.$d[c](l),$.init(),this.$d=$.set(_,Math.min(this.$D,$.daysInMonth())).$d}else c&&this.$d[c](l);return this.init(),this},i.set=function(t,s){return this.clone().$set(t,s)},i.get=function(t){return this[u.p(t)]()},i.add=function(t,s){var e,o=this;t=Number(t);var a=u.p(s),c=function(p){var w=g(o);return u.w(w.date(w.date()+Math.round(p*t)),o)};if(a===L)return this.set(L,this.$M+t);if(a===S)return this.set(S,this.$y+t);if(a===v)return c(1);if(a===f)return c(7);var l=(e={},e[m]=D,e[M]=n,e[d]=b,e)[a]||1,$=this.$d.getTime()+t*l;return u.w($,this)},i.subtract=function(t,s){return this.add(-1*t,s)},i.format=function(t){var s=this,e=this.$locale();if(!this.isValid())return e.invalidDate||E;var o=t||"YYYY-MM-DDTHH:mm:ssZ",a=u.z(this),c=this.$H,l=this.$m,$=this.$M,p=e.weekdays,w=e.months,H=e.meridiem,O=function(y,k,I,V){return y&&(y[k]||y(s,o))||I[k].slice(0,V)},A=function(y){return u.s(c%12||12,y,"0")},x=H||function(y,k,I){var V=y<12?"AM":"PM";return I?V.toLowerCase():V};return o.replace(rt,function(y,k){return k||(function(I){switch(I){case"YY":return String(s.$y).slice(-2);case"YYYY":return u.s(s.$y,4,"0");case"M":return $+1;case"MM":return u.s($+1,2,"0");case"MMM":return O(e.monthsShort,$,w,3);case"MMMM":return O(w,$);case"D":return s.$D;case"DD":return u.s(s.$D,2,"0");case"d":return String(s.$W);case"dd":return O(e.weekdaysMin,s.$W,p,2);case"ddd":return O(e.weekdaysShort,s.$W,p,3);case"dddd":return p[s.$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 x(c,l,!0);case"A":return x(c,l,!1);case"m":return String(l);case"mm":return u.s(l,2,"0");case"s":return String(s.$s);case"ss":return u.s(s.$s,2,"0");case"SSS":return u.s(s.$ms,3,"0");case"Z":return a}return null})(y)||a.replace(":","")})},i.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},i.diff=function(t,s,e){var o,a=this,c=u.p(s),l=g(t),$=(l.utcOffset()-this.utcOffset())*D,p=this-l,w=function(){return u.m(a,l)};switch(c){case S:o=w()/12;break;case L:o=w();break;case B:o=w()/3;break;case f:o=(p-$)/6048e5;break;case v:o=(p-$)/864e5;break;case M:o=p/n;break;case m:o=p/D;break;case d:o=p/b;break;default:o=p}return e?o:u.a(o)},i.daysInMonth=function(){return this.endOf(L).$D},i.$locale=function(){return T[this.$L]},i.locale=function(t,s){if(!t)return this.$L;var e=this.clone(),o=W(t,s,!0);return o&&(e.$L=o),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})(),z=C.prototype;return g.prototype=z,[["$ms",h],["$s",d],["$m",m],["$H",M],["$W",v],["$M",L],["$y",S],["$D",_]].forEach(function(r){z[r[1]]=function(i){return this.$g(i,r[0],r[1])}}),g.extend=function(r,i){return r.$i||(r(i,C,g),r.$i=!0),g},g.locale=W,g.isDayjs=U,g.unix=function(r){return g(1e3*r)},g.en=T[j],g.Ls=T,g.p={},g})});var q=ct(st(),1);var yt=(()=>{class b{$api=Y(it);$title=Y(X);$toastr=Y(et);$translate=Y(tt);settingsLoadedSubject=new Q;defaultTheme="deep-purple";forbiddenKeys=["__proto__","constructor","prototype"];env={};host;proxyHost;webroot;originalWebroot;formAuth=!0;sessionTimeout=28800;uiVersion;theme;lightingMode;currentLightingMode;actualLightingMode;browserLightingMode;menuMode;keepOrphans;wallpaper;serverTimeOffset=0;rtl=!1;browserLang;onSettingsLoaded=this.settingsLoadedSubject.pipe(G());settingsLoaded=!1;themeList=["orange","red","pink","purple","deep-purple","indigo","blue","blue-grey","cyan","green","teal","grey","brown"];constructor(){this.getAppSettings()}getAppSettings(){return P(this,null,function*(){let n=yield N(this.$api.get("/auth/settings"));this.formAuth=n.formAuth,this.sessionTimeout=n.sessionTimeout,this.env=n.env,this.host=n.host,this.webroot=n.webroot,this.originalWebroot=n.webroot,this.proxyHost=n.proxyHost,this.lightingMode=n.lightingMode,this.wallpaper=n.wallpaper,this.setLightingMode(this.lightingMode,"user"),this.setTheme(n.theme),this.setMenuMode(n.menuMode),this.setKeepOrphans(n.keepOrphans),this.setTitle(this.env.homebridgeInstanceName),this.checkServerTime(n.serverTimestamp),this.setUiVersion(n.env.packageVersion),this.setLang(this.env.lang),this.settingsLoaded=!0,this.settingsLoadedSubject.next(void 0),this.browserLang=this.$translate.getBrowserCultureLang()})}setBrowserLightingMode(n){this.browserLightingMode=n,this.lightingMode==="auto"&&this.setLightingMode(n,"browser")}setLightingMode(n,h){h==="user"&&(this.lightingMode=n),this.currentLightingMode=n,this.actualLightingMode=this.currentLightingMode==="auto"?this.browserLightingMode:this.currentLightingMode,this.theme&&this.setTheme(this.theme)}setTheme(n){(!n||!this.themeList.includes(n))&&(n=this.defaultTheme,N(this.$api.put("/config-editor/ui",{key:"theme",value:n})).catch(m=>console.error("Error saving setTheme:",m)));let h=window.document.querySelector("body");h.classList.remove(`config-ui-x-${this.theme}`),h.classList.remove(`config-ui-x-dark-mode-${this.theme}`),this.theme=n,this.actualLightingMode==="dark"?(h.classList.add(`config-ui-x-dark-mode-${this.theme}`),h.classList.contains("dark-mode")||h.classList.add("dark-mode")):(h.classList.add(`config-ui-x-${this.theme}`),h.classList.contains("dark-mode")&&h.classList.remove("dark-mode")),window.document.querySelectorAll("iframe").forEach((m,M)=>{try{let v=m.contentDocument;if(v){let f=v.body;this.actualLightingMode==="dark"?(f.classList.contains(`config-ui-x-${this.theme}`)&&f.classList.remove(`config-ui-x-${this.theme}`),f.classList.contains(`config-ui-x-dark-mode-${this.theme}`)||f.classList.add(`config-ui-x-dark-mode-${this.theme}`),f.classList.contains("dark-mode")||f.classList.add("dark-mode"),f.style.backgroundColor="#242424 !important",f.style.color="#ffffff !important"):(f.classList.contains(`config-ui-x-${this.theme}`)||f.classList.add(`config-ui-x-${this.theme}`),f.classList.contains(`config-ui-x-dark-mode-${this.theme}`)&&f.classList.remove(`config-ui-x-dark-mode-${this.theme}`),f.classList.contains("dark-mode")&&f.classList.remove("dark-mode"),f.style.backgroundColor="#ffffff !important",f.style.color="#000000 !important"),m.contentWindow.postMessage({type:"theme-update",isDark:this.actualLightingMode==="dark",theme:n},window.location.origin)}}catch(v){console.warn(`Iframe ${M}: Access denied (cross-origin?)`,{error:v,src:m.src})}})}setMenuMode(n){this.menuMode=n}setKeepOrphans(n){this.keepOrphans=n}setLang(n){n?this.$translate.use(n):n="auto",this.env.lang=n}setItem(n,h){this[n]=h}setEnvItem(n,h){if(n.includes(".")){let d=n.split("."),m=this.env;for(let M=0;M<d.length-1;M++){if(this.forbiddenKeys.includes(d[M]))return;m[d[M]]||(m[d[M]]={}),m=m[d[M]]}this.forbiddenKeys.includes(d[d.length-1])||(m[d[d.length-1]]=h)}else this.env[n]=h}checkServerTime(n){let d=(0,q.default)(n).diff((0,q.default)(),"hour");this.serverTimeOffset=d*60*60,(d>=8||d<=-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")})}setUiVersion(n){this.uiVersion||(this.uiVersion=n)}setTitle(n){this.$title.setTitle(n||"Homebridge")}static \u0275fac=function(h){return new(h||b)};static \u0275prov=R({token:b,factory:b.\u0275fac,providedIn:"root"})}return b})();export{st as a,yt as b};
1
+ import{k as tt,n as et,q as it}from"./chunk-KWFXAMYZ.js";import{T as G,e as ut,ea as R,g as ct,h as P,hd as X,ja as Y,n as Q,w as N}from"./chunk-V2XN5VIX.js";var st=ut((J,K)=>{(function(b,D){typeof J=="object"&&typeof K<"u"?K.exports=D():typeof define=="function"&&define.amd?define(D):(b=typeof globalThis<"u"?globalThis:b||self).dayjs=D()})(J,function(){"use strict";var b=1e3,D=6e4,n=36e5,h="millisecond",d="second",m="minute",M="hour",v="day",f="week",L="month",B="quarter",S="year",_="date",E="Invalid Date",nt=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,rt=/\[([^\]]+)]|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,ot={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 s=String(r);return!s||s.length>=i?r:""+Array(i+1-s.length).join(t)+r},at={s:F,z:function(r){var i=-r.utcOffset(),t=Math.abs(i),s=Math.floor(t/60),e=t%60;return(i<=0?"+":"-")+F(s,2,"0")+":"+F(e,2,"0")},m:function r(i,t){if(i.date()<t.date())return-r(t,i);var s=12*(t.year()-i.year())+(t.month()-i.month()),e=i.clone().add(s,L),o=t-e<0,a=i.clone().add(s+(o?-1:1),L);return+(-(s+(t-e)/(o?e-a:a-e))||0)},a:function(r){return r<0?Math.ceil(r)||0:Math.floor(r)},p:function(r){return{M:L,y:S,w:f,d:v,D:_,h:M,m,s:d,ms:h,Q:B}[r]||String(r||"").toLowerCase().replace(/s$/,"")},u:function(r){return r===void 0}},j="en",T={};T[j]=ot;var Z="$isDayjsObject",U=function(r){return r instanceof C||!(!r||!r[Z])},W=function r(i,t,s){var e;if(!i)return j;if(typeof i=="string"){var o=i.toLowerCase();T[o]&&(e=o),t&&(T[o]=t,e=o);var a=i.split("-");if(!e&&a.length>1)return r(a[0])}else{var c=i.name;T[c]=i,e=c}return!s&&e&&(j=e),e||!s&&j},g=function(r,i){if(U(r))return r.clone();var t=typeof i=="object"?i:{};return t.date=r,t.args=arguments,new C(t)},u=at;u.l=W,u.i=U,u.w=function(r,i){return g(r,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var C=(function(){function r(t){this.$L=W(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[Z]=!0}var i=r.prototype;return i.parse=function(t){this.$d=(function(s){var e=s.date,o=s.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(nt);if(a){var c=a[2]-1||0,l=(a[7]||"0").substring(0,3);return o?new Date(Date.UTC(a[1],c,a[3]||1,a[4]||0,a[5]||0,a[6]||0,l)):new Date(a[1],c,a[3]||1,a[4]||0,a[5]||0,a[6]||0,l)}}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()!==E},i.isSame=function(t,s){var e=g(t);return this.startOf(s)<=e&&e<=this.endOf(s)},i.isAfter=function(t,s){return g(t)<this.startOf(s)},i.isBefore=function(t,s){return this.endOf(s)<g(t)},i.$g=function(t,s,e){return u.u(t)?this[s]:this.set(e,t)},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this.$d.getTime()},i.startOf=function(t,s){var e=this,o=!!u.u(s)||s,a=u.p(t),c=function(x,y){var k=u.w(e.$u?Date.UTC(e.$y,y,x):new Date(e.$y,y,x),e);return o?k:k.endOf(v)},l=function(x,y){return u.w(e.toDate()[x].apply(e.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(y)),e)},$=this.$W,p=this.$M,w=this.$D,H="set"+(this.$u?"UTC":"");switch(a){case S:return o?c(1,0):c(31,11);case L:return o?c(1,p):c(0,p+1);case f:var O=this.$locale().weekStart||0,A=($<O?$+7:$)-O;return c(o?w-A:w+(6-A),p);case v:case _:return l(H+"Hours",0);case M:return l(H+"Minutes",1);case m:return l(H+"Seconds",2);case d:return l(H+"Milliseconds",3);default:return this.clone()}},i.endOf=function(t){return this.startOf(t,!1)},i.$set=function(t,s){var e,o=u.p(t),a="set"+(this.$u?"UTC":""),c=(e={},e[v]=a+"Date",e[_]=a+"Date",e[L]=a+"Month",e[S]=a+"FullYear",e[M]=a+"Hours",e[m]=a+"Minutes",e[d]=a+"Seconds",e[h]=a+"Milliseconds",e)[o],l=o===v?this.$D+(s-this.$W):s;if(o===L||o===S){var $=this.clone().set(_,1);$.$d[c](l),$.init(),this.$d=$.set(_,Math.min(this.$D,$.daysInMonth())).$d}else c&&this.$d[c](l);return this.init(),this},i.set=function(t,s){return this.clone().$set(t,s)},i.get=function(t){return this[u.p(t)]()},i.add=function(t,s){var e,o=this;t=Number(t);var a=u.p(s),c=function(p){var w=g(o);return u.w(w.date(w.date()+Math.round(p*t)),o)};if(a===L)return this.set(L,this.$M+t);if(a===S)return this.set(S,this.$y+t);if(a===v)return c(1);if(a===f)return c(7);var l=(e={},e[m]=D,e[M]=n,e[d]=b,e)[a]||1,$=this.$d.getTime()+t*l;return u.w($,this)},i.subtract=function(t,s){return this.add(-1*t,s)},i.format=function(t){var s=this,e=this.$locale();if(!this.isValid())return e.invalidDate||E;var o=t||"YYYY-MM-DDTHH:mm:ssZ",a=u.z(this),c=this.$H,l=this.$m,$=this.$M,p=e.weekdays,w=e.months,H=e.meridiem,O=function(y,k,I,V){return y&&(y[k]||y(s,o))||I[k].slice(0,V)},A=function(y){return u.s(c%12||12,y,"0")},x=H||function(y,k,I){var V=y<12?"AM":"PM";return I?V.toLowerCase():V};return o.replace(rt,function(y,k){return k||(function(I){switch(I){case"YY":return String(s.$y).slice(-2);case"YYYY":return u.s(s.$y,4,"0");case"M":return $+1;case"MM":return u.s($+1,2,"0");case"MMM":return O(e.monthsShort,$,w,3);case"MMMM":return O(w,$);case"D":return s.$D;case"DD":return u.s(s.$D,2,"0");case"d":return String(s.$W);case"dd":return O(e.weekdaysMin,s.$W,p,2);case"ddd":return O(e.weekdaysShort,s.$W,p,3);case"dddd":return p[s.$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 x(c,l,!0);case"A":return x(c,l,!1);case"m":return String(l);case"mm":return u.s(l,2,"0");case"s":return String(s.$s);case"ss":return u.s(s.$s,2,"0");case"SSS":return u.s(s.$ms,3,"0");case"Z":return a}return null})(y)||a.replace(":","")})},i.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},i.diff=function(t,s,e){var o,a=this,c=u.p(s),l=g(t),$=(l.utcOffset()-this.utcOffset())*D,p=this-l,w=function(){return u.m(a,l)};switch(c){case S:o=w()/12;break;case L:o=w();break;case B:o=w()/3;break;case f:o=(p-$)/6048e5;break;case v:o=(p-$)/864e5;break;case M:o=p/n;break;case m:o=p/D;break;case d:o=p/b;break;default:o=p}return e?o:u.a(o)},i.daysInMonth=function(){return this.endOf(L).$D},i.$locale=function(){return T[this.$L]},i.locale=function(t,s){if(!t)return this.$L;var e=this.clone(),o=W(t,s,!0);return o&&(e.$L=o),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})(),z=C.prototype;return g.prototype=z,[["$ms",h],["$s",d],["$m",m],["$H",M],["$W",v],["$M",L],["$y",S],["$D",_]].forEach(function(r){z[r[1]]=function(i){return this.$g(i,r[0],r[1])}}),g.extend=function(r,i){return r.$i||(r(i,C,g),r.$i=!0),g},g.locale=W,g.isDayjs=U,g.unix=function(r){return g(1e3*r)},g.en=T[j],g.Ls=T,g.p={},g})});var q=ct(st(),1);var yt=(()=>{class b{$api=Y(it);$title=Y(X);$toastr=Y(et);$translate=Y(tt);settingsLoadedSubject=new Q;defaultTheme="deep-purple";forbiddenKeys=["__proto__","constructor","prototype"];env={};host;proxyHost;webroot;originalWebroot;formAuth=!0;sessionTimeout=28800;uiVersion;theme;lightingMode;currentLightingMode;actualLightingMode;browserLightingMode;menuMode;keepOrphans;wallpaper;serverTimeOffset=0;rtl=!1;browserLang;onSettingsLoaded=this.settingsLoadedSubject.pipe(G());settingsLoaded=!1;themeList=["orange","red","pink","purple","deep-purple","indigo","blue","blue-grey","cyan","green","teal","grey","brown"];constructor(){this.getAppSettings()}getAppSettings(){return P(this,null,function*(){let n=yield N(this.$api.get("/auth/settings"));this.formAuth=n.formAuth,this.sessionTimeout=n.sessionTimeout,this.env=n.env,this.host=n.host,this.webroot=n.webroot,this.originalWebroot=n.webroot,this.proxyHost=n.proxyHost,this.lightingMode=n.lightingMode,this.wallpaper=n.wallpaper,this.setLightingMode(this.lightingMode,"user"),this.setTheme(n.theme),this.setMenuMode(n.menuMode),this.setKeepOrphans(n.keepOrphans),this.setTitle(this.env.homebridgeInstanceName),this.checkServerTime(n.serverTimestamp),this.setUiVersion(n.env.packageVersion),this.setLang(this.env.lang),this.settingsLoaded=!0,this.settingsLoadedSubject.next(void 0),this.browserLang=this.$translate.getBrowserCultureLang()})}setBrowserLightingMode(n){this.browserLightingMode=n,this.lightingMode==="auto"&&this.setLightingMode(n,"browser")}setLightingMode(n,h){h==="user"&&(this.lightingMode=n),this.currentLightingMode=n,this.actualLightingMode=this.currentLightingMode==="auto"?this.browserLightingMode:this.currentLightingMode,this.theme&&this.setTheme(this.theme)}setTheme(n){(!n||!this.themeList.includes(n))&&(n=this.defaultTheme,N(this.$api.put("/config-editor/ui",{key:"theme",value:n})).catch(m=>console.error("Error saving setTheme:",m)));let h=window.document.querySelector("body");h.classList.remove(`config-ui-x-${this.theme}`),h.classList.remove(`config-ui-x-dark-mode-${this.theme}`),this.theme=n,this.actualLightingMode==="dark"?(h.classList.add(`config-ui-x-dark-mode-${this.theme}`),h.classList.contains("dark-mode")||h.classList.add("dark-mode")):(h.classList.add(`config-ui-x-${this.theme}`),h.classList.contains("dark-mode")&&h.classList.remove("dark-mode")),window.document.querySelectorAll("iframe").forEach((m,M)=>{try{let v=m.contentDocument;if(v){let f=v.body;this.actualLightingMode==="dark"?(f.classList.contains(`config-ui-x-${this.theme}`)&&f.classList.remove(`config-ui-x-${this.theme}`),f.classList.contains(`config-ui-x-dark-mode-${this.theme}`)||f.classList.add(`config-ui-x-dark-mode-${this.theme}`),f.classList.contains("dark-mode")||f.classList.add("dark-mode"),f.style.backgroundColor="#242424 !important",f.style.color="#ffffff !important"):(f.classList.contains(`config-ui-x-${this.theme}`)||f.classList.add(`config-ui-x-${this.theme}`),f.classList.contains(`config-ui-x-dark-mode-${this.theme}`)&&f.classList.remove(`config-ui-x-dark-mode-${this.theme}`),f.classList.contains("dark-mode")&&f.classList.remove("dark-mode"),f.style.backgroundColor="#ffffff !important",f.style.color="#000000 !important"),m.contentWindow.postMessage({type:"theme-update",isDark:this.actualLightingMode==="dark",theme:n},window.location.origin)}}catch(v){console.warn(`Iframe ${M}: Access denied (cross-origin?)`,{error:v,src:m.src})}})}setMenuMode(n){this.menuMode=n}setKeepOrphans(n){this.keepOrphans=n}setLang(n){n?this.$translate.use(n):n="auto",this.env.lang=n}setItem(n,h){this[n]=h}setEnvItem(n,h){if(n.includes(".")){let d=n.split("."),m=this.env;for(let M=0;M<d.length-1;M++){if(this.forbiddenKeys.includes(d[M]))return;m[d[M]]||(m[d[M]]={}),m=m[d[M]]}this.forbiddenKeys.includes(d[d.length-1])||(m[d[d.length-1]]=h)}else this.env[n]=h}checkServerTime(n){let d=(0,q.default)(n).diff((0,q.default)(),"hour");this.serverTimeOffset=d*60*60,(d>=8||d<=-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")})}setUiVersion(n){this.uiVersion||(this.uiVersion=n)}setTitle(n){this.$title.setTitle(n||"Homebridge")}static \u0275fac=function(h){return new(h||b)};static \u0275prov=R({token:b,factory:b.\u0275fac,providedIn:"root"})}return b})();export{st as a,yt as b};
@@ -1 +1 @@
1
- import{b as n}from"./chunk-2D7HQVKR.js";import{d as u}from"./chunk-YMAWYUA6.js";import{b as m}from"./chunk-HPUVHUIE.js";import{k as c,n as h,p as f}from"./chunk-7KLW5GIG.js";import{ea as i,h as o,ja as r,w as s}from"./chunk-V2XN5VIX.js";var p=(()=>{class t{cache=null;CACHE_DURATION_MS=6e4;getToken(){let a=Date.now();if(this.cache&&a-this.cache.timestamp<this.CACHE_DURATION_MS)return this.cache.token;let e=window.localStorage.getItem(f.jwt.tokenKey);return this.cache={token:e,timestamp:a},e}invalidateCache(){this.cache=null}static \u0275fac=function(e){return new(e||t)};static \u0275prov=i({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var $=(()=>{class t{$auth=r(n);$tokenCache=r(p);isAuthenticated(){return o(this,null,function*(){if(!this.$tokenCache.getToken())return this.$auth.token=null,this.$auth.user={},this.$tokenCache.invalidateCache(),!1;try{return this.$auth.isLoggedIn()}catch{return this.$auth.logout(),this.$tokenCache.invalidateCache(),!1}})}static \u0275fac=function(e){return new(e||t)};static \u0275prov=i({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var L=(()=>{class t{$auth=r(n);$authHelper=r($);$router=r(u);$settings=r(m);$translate=r(c);$toastr=r(h);canActivate(a,e){return o(this,null,function*(){return this.$settings.settingsLoaded||(yield s(this.$settings.onSettingsLoaded)),this.$settings.formAuth===!1?(yield this.$auth.noauth(),!0):(yield this.$authHelper.isAuthenticated())?this.$auth.user?.admin?!0:(this.$toastr.error(this.$translate.instant("toast.no_auth"),this.$translate.instant("toast.title_error")),yield this.$router.navigate(["/"]),!1):(window.sessionStorage.setItem("target_route",e.url),yield this.$router.navigate(["/login"]),!1)})}static \u0275fac=function(e){return new(e||t)};static \u0275prov=i({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{p as a,$ as b,L as c};
1
+ import{b as n}from"./chunk-RJECYPFA.js";import{d as u}from"./chunk-YMAWYUA6.js";import{b as m}from"./chunk-Y6PTF4YJ.js";import{k as c,n as h,p as f}from"./chunk-KWFXAMYZ.js";import{ea as i,h as o,ja as r,w as s}from"./chunk-V2XN5VIX.js";var p=(()=>{class t{cache=null;CACHE_DURATION_MS=6e4;getToken(){let a=Date.now();if(this.cache&&a-this.cache.timestamp<this.CACHE_DURATION_MS)return this.cache.token;let e=window.localStorage.getItem(f.jwt.tokenKey);return this.cache={token:e,timestamp:a},e}invalidateCache(){this.cache=null}static \u0275fac=function(e){return new(e||t)};static \u0275prov=i({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var $=(()=>{class t{$auth=r(n);$tokenCache=r(p);isAuthenticated(){return o(this,null,function*(){if(!this.$tokenCache.getToken())return this.$auth.token=null,this.$auth.user={},this.$tokenCache.invalidateCache(),!1;try{return this.$auth.isLoggedIn()}catch{return this.$auth.logout(),this.$tokenCache.invalidateCache(),!1}})}static \u0275fac=function(e){return new(e||t)};static \u0275prov=i({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var L=(()=>{class t{$auth=r(n);$authHelper=r($);$router=r(u);$settings=r(m);$translate=r(c);$toastr=r(h);canActivate(a,e){return o(this,null,function*(){return this.$settings.settingsLoaded||(yield s(this.$settings.onSettingsLoaded)),this.$settings.formAuth===!1?(yield this.$auth.noauth(),!0):(yield this.$authHelper.isAuthenticated())?this.$auth.user?.admin?!0:(this.$toastr.error(this.$translate.instant("toast.no_auth"),this.$translate.instant("toast.title_error")),yield this.$router.navigate(["/"]),!1):(window.sessionStorage.setItem("target_route",e.url),yield this.$router.navigate(["/login"]),!1)})}static \u0275fac=function(e){return new(e||t)};static \u0275prov=i({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{p as a,$ as b,L as c};
package/public/index.html CHANGED
@@ -20,5 +20,5 @@
20
20
 
21
21
  <body>
22
22
  <app-root></app-root>
23
- <link rel="modulepreload" href="chunk-FP4B5ZM4.js"><link rel="modulepreload" href="chunk-WDE5OXOY.js"><link rel="modulepreload" href="chunk-7XG67XSY.js"><link rel="modulepreload" href="chunk-TES6RTPW.js"><link rel="modulepreload" href="chunk-SDNFT4EO.js"><link rel="modulepreload" href="chunk-JR2FLREK.js"><link rel="modulepreload" href="chunk-GKQKFOED.js"><link rel="modulepreload" href="chunk-MCA223NA.js"><link rel="modulepreload" href="chunk-4VGD3WI7.js"><link rel="modulepreload" href="chunk-3PZPX5LT.js"><script src="polyfills-5KWHJ7II.js" type="module" crossorigin="use-credentials"></script><script src="main-B7UGKBVJ.js" type="module" crossorigin="use-credentials"></script></body>
23
+ <link rel="modulepreload" href="chunk-YR5AVFAB.js"><link rel="modulepreload" href="chunk-253ZBDHH.js"><link rel="modulepreload" href="chunk-7XG67XSY.js"><link rel="modulepreload" href="chunk-AW4QFYCR.js"><link rel="modulepreload" href="chunk-VZV2F4H3.js"><link rel="modulepreload" href="chunk-OXWDSC64.js"><link rel="modulepreload" href="chunk-GKQKFOED.js"><link rel="modulepreload" href="chunk-CDAIJVOO.js"><link rel="modulepreload" href="chunk-7VHLSUED.js"><link rel="modulepreload" href="chunk-UVDUQESK.js"><script src="polyfills-5KWHJ7II.js" type="module" crossorigin="use-credentials"></script><script src="main-SHSVLBYV.js" type="module" crossorigin="use-credentials"></script></body>
24
24
  </html>