homebridge-config-ui-x 5.4.2-beta.32 → 5.4.2-beta.34

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 (59) hide show
  1. package/CHANGELOG.md +2 -1
  2. package/dist/main.js +14 -7
  3. package/dist/main.js.map +1 -1
  4. package/package.json +1 -1
  5. package/public/{chunk-ARN3DIZU.js → chunk-2QIBEJ2P.js} +1 -1
  6. package/public/{chunk-6LW2MKTG.js → chunk-3YTDUGW7.js} +1 -1
  7. package/public/{chunk-OVGKFDFW.js → chunk-45OZYP45.js} +1 -1
  8. package/public/{chunk-KLBR7SHV.js → chunk-4DKOKZK5.js} +1 -1
  9. package/public/{chunk-EECWUK4D.js → chunk-4KCBR6KN.js} +1 -1
  10. package/public/{chunk-OUV3RPSD.js → chunk-4QMPZEU2.js} +1 -1
  11. package/public/{chunk-UP5UKGFD.js → chunk-4VANYPAJ.js} +1 -1
  12. package/public/{chunk-7QJGKHFT.js → chunk-4X7L4KQL.js} +1 -1
  13. package/public/{chunk-J3RGOSBR.js → chunk-5CK36DGM.js} +1 -1
  14. package/public/{chunk-DZDDCNNF.js → chunk-64F5HSDQ.js} +1 -1
  15. package/public/{chunk-UE6YZHXO.js → chunk-6LIDOYQ5.js} +1 -1
  16. package/public/{chunk-PB7GD56Y.js → chunk-7F4X6BE3.js} +1 -1
  17. package/public/{chunk-ITOVHYB6.js → chunk-7NV4KY6W.js} +1 -1
  18. package/public/{chunk-WBNKUBXJ.js → chunk-AEDYX7QW.js} +1 -1
  19. package/public/{chunk-7QONSWT2.js → chunk-AHMEX5XD.js} +1 -1
  20. package/public/{chunk-7TO7GIHF.js → chunk-AVBJ5EMT.js} +1 -1
  21. package/public/{chunk-Q2C3O22T.js → chunk-AWE7H5PY.js} +1 -1
  22. package/public/{chunk-JQMMQ5EO.js → chunk-B4YN4FBB.js} +1 -1
  23. package/public/{chunk-32GFMPDQ.js → chunk-BDITCHXY.js} +1 -1
  24. package/public/{chunk-CIKB3CBW.js → chunk-BJAULSY4.js} +1 -1
  25. package/public/{chunk-CE6QU262.js → chunk-ENYL2YPO.js} +1 -1
  26. package/public/{chunk-YT7YOJIG.js → chunk-ET6IVHAD.js} +1 -1
  27. package/public/{chunk-RN26J2ZA.js → chunk-F54OPRBZ.js} +1 -1
  28. package/public/{chunk-DDZQDKFI.js → chunk-GTZIY7WT.js} +1 -1
  29. package/public/{chunk-IRIC45XO.js → chunk-HC6M5EBC.js} +1 -1
  30. package/public/{chunk-3HJ7QT3X.js → chunk-HFGCMLED.js} +1 -1
  31. package/public/chunk-HSA6M4GG.js +1 -0
  32. package/public/{chunk-TSP2UOFU.js → chunk-JFZ2A252.js} +1 -1
  33. package/public/{chunk-LS6V4MTS.js → chunk-JMWLREAW.js} +1 -1
  34. package/public/{chunk-W5MMQVTG.js → chunk-KCDOWEBJ.js} +1 -1
  35. package/public/{chunk-HHSNLXO5.js → chunk-KRWZHVHO.js} +1 -1
  36. package/public/{chunk-DLAG45D4.js → chunk-LI7O67NH.js} +1 -1
  37. package/public/{chunk-NKNRTCHV.js → chunk-NHBQVYGJ.js} +2 -2
  38. package/public/{chunk-PMS4BD4M.js → chunk-NRHD2BXN.js} +1 -1
  39. package/public/{chunk-GFZHIIGP.js → chunk-NVM7LIBV.js} +1 -1
  40. package/public/{chunk-Y6WDDABX.js → chunk-O5GV34LY.js} +1 -1
  41. package/public/{chunk-A7HEK7KJ.js → chunk-QMNQ4FAL.js} +1 -1
  42. package/public/{chunk-SMAWZV6A.js → chunk-QTZTX2XP.js} +1 -1
  43. package/public/{chunk-DF6PV5NA.js → chunk-R2L5QSSW.js} +1 -1
  44. package/public/{chunk-VSLFV67W.js → chunk-RCM5XFVU.js} +1 -1
  45. package/public/{chunk-HR4MENA5.js → chunk-RZHE43I6.js} +1 -1
  46. package/public/{chunk-ZA4OKVHE.js → chunk-S7XHIZ2C.js} +1 -1
  47. package/public/{chunk-X6V22YXW.js → chunk-SQLHNVND.js} +1 -1
  48. package/public/{chunk-F65FCGRR.js → chunk-TST4TLQB.js} +1 -1
  49. package/public/{chunk-77NQK5FT.js → chunk-U6RUTZFH.js} +1 -1
  50. package/public/{chunk-BAJTXDJ3.js → chunk-W4QA6YCR.js} +1 -1
  51. package/public/{chunk-TJKYWYK2.js → chunk-WFDBV66D.js} +1 -1
  52. package/public/{chunk-L4H6B7QI.js → chunk-XRASUEWC.js} +1 -1
  53. package/public/{chunk-6BN6PZTG.js → chunk-XY46FVZF.js} +1 -1
  54. package/public/{chunk-DHH6BC7C.js → chunk-YM7YGOQM.js} +1 -1
  55. package/public/{chunk-QLRP45O7.js → chunk-Z3AQIRMS.js} +1 -1
  56. package/public/{chunk-Q2WJQ7WK.js → chunk-ZJHKGKFK.js} +1 -1
  57. package/public/index.html +1 -1
  58. package/public/{main-YXL27P3U.js → main-X3XBQQT2.js} +1 -1
  59. package/public/chunk-XGUYU34S.js +0 -1
package/CHANGELOG.md CHANGED
@@ -11,7 +11,7 @@ All notable changes to `homebridge-config-ui-x` will be documented in this file.
11
11
  - refreshed icons: security system
12
12
  - refreshed icons: lock mechanism
13
13
  - refreshed icons: irrigation system + valves
14
- refreshed icons: light, leak, motion, occ., hum. sensor
14
+ - refreshed icons: light, leak, motion, occ., hum. sensor
15
15
  - expand/collapse state saving for update information - docker information (#2529) (@NorthernMan54)
16
16
  - refreshed icons: lightbulb, switch, outlet + unknown
17
17
  - refreshed icons: heater, cooler, de/humidifier + thermostat
@@ -31,6 +31,7 @@ All notable changes to `homebridge-config-ui-x` will be documented in this file.
31
31
  - prevent url-based settings from being changed from a pwa
32
32
  - fix instructions on login page for recovering admin account
33
33
  - show system info table rows when data is ready per row
34
+ - allow show/hide widgets and widget config on mobile
34
35
 
35
36
  ### Other Changes
36
37
 
package/dist/main.js CHANGED
@@ -26,9 +26,6 @@ Object.defineProperty(exports, "HomebridgeIpcService", { enumerable: true, get:
26
26
  node_process_1.default.env.UIX_BASE_PATH = node_process_1.default.env.UIX_BASE_PATH_OVERRIDE || (0, node_path_1.resolve)(__dirname, '../');
27
27
  async function bootstrap() {
28
28
  const startupConfig = await (0, config_startup_1.getStartupConfig)();
29
- const webroot = startupConfig.webroot && startupConfig.webroot !== '/' ? startupConfig.webroot : '';
30
- node_process_1.default.env.UIX_WEBROOT = webroot;
31
- await spa_html_service_1.SpaHtmlService.updateIndexHtml(webroot);
32
29
  const fAdapter = new platform_fastify_1.FastifyAdapter({
33
30
  https: startupConfig.httpsOptions,
34
31
  logger: startupConfig.debug || false,
@@ -75,7 +72,17 @@ async function bootstrap() {
75
72
  });
76
73
  const configService = app.get(config_service_1.ConfigService);
77
74
  const logger = app.get(logger_service_1.Logger);
78
- app.getHttpAdapter().get(webroot || '/', async (req, res) => {
75
+ node_process_1.default.env.UIX_WEBROOT = startupConfig.webroot;
76
+ if (startupConfig.webroot) {
77
+ try {
78
+ await spa_html_service_1.SpaHtmlService.updateIndexHtml(startupConfig.webroot);
79
+ }
80
+ catch (error) {
81
+ logger.warn(`Could not update index.html with webroot ${startupConfig.webroot}: ${error.message}`);
82
+ startupConfig.webroot = '';
83
+ }
84
+ }
85
+ app.getHttpAdapter().get(startupConfig.webroot || '/', async (req, res) => {
79
86
  res.type('text/html');
80
87
  res.header('Cache-Control', 'no-cache, no-store, must-revalidate');
81
88
  res.header('Pragma', 'no-cache');
@@ -88,9 +95,9 @@ async function bootstrap() {
88
95
  setHeaders(res) {
89
96
  res.setHeader('Cache-Control', 'public,max-age=31536000,immutable');
90
97
  },
91
- ...webroot ? { prefix: webroot } : {},
98
+ ...startupConfig.webroot ? { prefix: startupConfig.webroot } : {},
92
99
  });
93
- app.setGlobalPrefix(`${webroot}/api`);
100
+ app.setGlobalPrefix(`${startupConfig.webroot || ''}/api`);
94
101
  app.enableCors({
95
102
  origin: ['http://localhost:8080', 'http://localhost:4200'],
96
103
  methods: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'],
@@ -113,7 +120,7 @@ async function bootstrap() {
113
120
  })
114
121
  .build();
115
122
  const document = swagger_1.SwaggerModule.createDocument(app, options);
116
- swagger_1.SwaggerModule.setup(`${webroot}/swagger`.replace(/^\//, ''), app, document);
123
+ swagger_1.SwaggerModule.setup(`${startupConfig.webroot}/swagger`.replace(/^\//, ''), app, document);
117
124
  app.useGlobalFilters(new spa_filter_1.SpaFilter());
118
125
  logger.warn(`Homebridge UI v${configService.package.version} is listening on ${startupConfig.host} port ${configService.ui.port}.`);
119
126
  await app.listen(configService.ui.port, startupConfig.host);
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;;;;;AAGA,yCAAmC;AACnC,gEAAkC;AAElC,6DAAoC;AACpC,mEAAiD;AACjD,2CAA+C;AAC/C,uCAA0C;AAC1C,+DAAyD;AACzD,6CAAgE;AAChE,uCAAmC;AAEnC,6CAAwC;AACxC,iEAA4D;AAC5D,iEAA+D;AAC/D,iEAAqD;AACrD,kEAA4D;AAC5D,sDAAiD;AAEjD,wBAAqB;AACrB,4BAAyB;AAEzB,uFAAmF;AAA1E,8HAAA,oBAAoB,OAAA;AAE7B,sBAAO,CAAC,GAAG,CAAC,aAAa,GAAG,sBAAO,CAAC,GAAG,CAAC,sBAAsB,IAAI,IAAA,mBAAO,EAAC,SAAS,EAAE,KAAK,CAAC,CAAA;AAE3F,KAAK,UAAU,SAAS;IACtB,MAAM,aAAa,GAAG,MAAM,IAAA,iCAAgB,GAAE,CAAA;IAC9C,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,IAAI,aAAa,CAAC,OAAO,KAAK,GAAG,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAA;IAGnG,sBAAO,CAAC,GAAG,CAAC,WAAW,GAAG,OAAO,CAAA;IAGjC,MAAM,iCAAc,CAAC,eAAe,CAAC,OAAO,CAAC,CAAA;IAE7C,MAAM,QAAQ,GAAG,IAAI,iCAAc,C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,EAAE,CAAC,IAAI,GAAG,CAAC,CAAA;IACnI,MAAM,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC,CAAA;IAE3D,OAAO,GAAG,CAAA;AACZ,CAAC;AAEY,QAAA,GAAG,GAAG,SAAS,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "homebridge-config-ui-x",
3
3
  "displayName": "Homebridge UI",
4
- "version": "5.4.2-beta.32",
4
+ "version": "5.4.2-beta.34",
5
5
  "description": "A web based management, configuration and control platform for Homebridge.",
6
6
  "author": "oznu <dev@oz.nu>",
7
7
  "license": "MIT",
@@ -1 +1 @@
1
- import{m as I}from"./chunk-LXFVNKLD.js";import{l as H}from"./chunk-PMS4BD4M.js";import{Db as B,Eb as p,Ga as r,Hb as f,Ib as m,La as i,Ub as v,Vb as u,Wa as L,Wb as k,Xb as E,dc as g,ja as M,kb as x,lb as d,mb as c,mc as C,nc as b,oa as T,pa as y,vb as o,wb as a,xb as s}from"./chunk-V2XN5VIX.js";function S(t,_){if(t&1&&s(0,"i",14),t&2){let e=m();v(g("fas fa-fw ",e.faIconClass," mb-3"))}}function z(t,_){if(t&1&&s(0,"p",7),t&2){let e=m();p("innerHTML",e.message2,r)}}function h(t,_){if(t&1&&s(0,"p",7),t&2){let e=m();p("innerHTML",e.message3,r)}}function P(t,_){if(t&1){let e=B();o(0,"button",15),f("click",function(){T(e);let n=m();return y(n.closeModal())}),u(1),a()}if(t&2){let e=m();v(g("btn ",e.confirmButtonClass||"btn-primary")),i(),E(" ",e.confirmButtonLabel," ")}}var N=(()=>{class t{$activeModal=M(I);title;message;message2;message3;confirmButtonLabel;confirmButtonClass;faIconClass;dismissModal(){this.$activeModal.dismiss("Dismiss")}closeModal(){this.$activeModal.close()}static \u0275fac=function(l){return new(l||t)};static \u0275cmp=L({type:t,selectors:[["ng-component"]],inputs:{title:"title",message:"message",message2:"message2",message3:"message3",confirmButtonLabel:"confirmButtonLabel",confirmButtonClass:"confirmButtonClass",faIconClass:"faIconClass"},decls:20,vars:15,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center"],[2,"font-size","75px",3,"class"],[1,"mb-0","text-center",3,"innerHTML"],[1,"mt-2","mb-0","text-center",3,"innerHTML"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",3,"class"],[2,"font-size","75px"],["type","button","data-bs-dismiss","modal",3,"click"]],template:function(l,n){l&1&&(o(0,"div",0)(1,"div",1)(2,"h5",2),u(3),a(),o(4,"button",3),C(5,"translate"),f("click",function(){return n.dismissModal()}),a()(),o(6,"div",4),d(7,S,1,3,"i",5),s(8,"p",6),d(9,z,1,1,"p",7),d(10,h,1,1,"p",7),a(),o(11,"div",8)(12,"div",9)(13,"button",10),C(14,"translate"),f("click",function(){return n.dismissModal()}),u(15),C(16,"translate"),a()(),s(17,"div",11),o(18,"div",12),d(19,P,2,4,"button",13),a()()()),l&2&&(i(3),k(n.title),i(),x("aria-label",b(5,9,"form.button_close")),i(3),c(n.faIconClass?7:-1),i(),p("innerHTML",n.message,r),i(),c(n.message2?9:-1),i(),c(n.message3?10:-1),i(3),x("aria-label",b(14,11,"form.button_cancel")),i(2),E(" ",b(16,13,"form.button_cancel")," "),i(4),c(n.confirmButtonLabel?19:-1))},dependencies:[H],encapsulation:2})}return t})();export{N as a};
1
+ import{m as I}from"./chunk-LXFVNKLD.js";import{l as H}from"./chunk-NRHD2BXN.js";import{Db as B,Eb as p,Ga as r,Hb as f,Ib as m,La as i,Ub as v,Vb as u,Wa as L,Wb as k,Xb as E,dc as g,ja as M,kb as x,lb as d,mb as c,mc as C,nc as b,oa as T,pa as y,vb as o,wb as a,xb as s}from"./chunk-V2XN5VIX.js";function S(t,_){if(t&1&&s(0,"i",14),t&2){let e=m();v(g("fas fa-fw ",e.faIconClass," mb-3"))}}function z(t,_){if(t&1&&s(0,"p",7),t&2){let e=m();p("innerHTML",e.message2,r)}}function h(t,_){if(t&1&&s(0,"p",7),t&2){let e=m();p("innerHTML",e.message3,r)}}function P(t,_){if(t&1){let e=B();o(0,"button",15),f("click",function(){T(e);let n=m();return y(n.closeModal())}),u(1),a()}if(t&2){let e=m();v(g("btn ",e.confirmButtonClass||"btn-primary")),i(),E(" ",e.confirmButtonLabel," ")}}var N=(()=>{class t{$activeModal=M(I);title;message;message2;message3;confirmButtonLabel;confirmButtonClass;faIconClass;dismissModal(){this.$activeModal.dismiss("Dismiss")}closeModal(){this.$activeModal.close()}static \u0275fac=function(l){return new(l||t)};static \u0275cmp=L({type:t,selectors:[["ng-component"]],inputs:{title:"title",message:"message",message2:"message2",message3:"message3",confirmButtonLabel:"confirmButtonLabel",confirmButtonClass:"confirmButtonClass",faIconClass:"faIconClass"},decls:20,vars:15,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center"],[2,"font-size","75px",3,"class"],[1,"mb-0","text-center",3,"innerHTML"],[1,"mt-2","mb-0","text-center",3,"innerHTML"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",3,"class"],[2,"font-size","75px"],["type","button","data-bs-dismiss","modal",3,"click"]],template:function(l,n){l&1&&(o(0,"div",0)(1,"div",1)(2,"h5",2),u(3),a(),o(4,"button",3),C(5,"translate"),f("click",function(){return n.dismissModal()}),a()(),o(6,"div",4),d(7,S,1,3,"i",5),s(8,"p",6),d(9,z,1,1,"p",7),d(10,h,1,1,"p",7),a(),o(11,"div",8)(12,"div",9)(13,"button",10),C(14,"translate"),f("click",function(){return n.dismissModal()}),u(15),C(16,"translate"),a()(),s(17,"div",11),o(18,"div",12),d(19,P,2,4,"button",13),a()()()),l&2&&(i(3),k(n.title),i(),x("aria-label",b(5,9,"form.button_close")),i(3),c(n.faIconClass?7:-1),i(),p("innerHTML",n.message,r),i(),c(n.message2?9:-1),i(),c(n.message3?10:-1),i(3),x("aria-label",b(14,11,"form.button_cancel")),i(2),E(" ",b(16,13,"form.button_cancel")," "),i(4),c(n.confirmButtonLabel?19:-1))},dependencies:[H],encapsulation:2})}return t})();export{N as a};
@@ -1 +1 @@
1
- import{g as i}from"./chunk-YMAWYUA6.js";import{Xa as e,fa as t}from"./chunk-V2XN5VIX.js";var d=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"docker",loadChildren:()=>import("./chunk-IRIC45XO.js").then(o=>o.DockerModule)},{path:"linux",loadChildren:()=>import("./chunk-VSLFV67W.js").then(o=>o.LinuxModule)},{path:"terminal",loadChildren:()=>import("./chunk-32GFMPDQ.js").then(o=>o.TerminalModule)}],l=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[i.forChild(d),i]})}return o})();var p=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[l]})}return o})();export{p as PlatformToolsModule};
1
+ import{g as i}from"./chunk-YMAWYUA6.js";import{Xa as e,fa as t}from"./chunk-V2XN5VIX.js";var d=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"docker",loadChildren:()=>import("./chunk-HC6M5EBC.js").then(o=>o.DockerModule)},{path:"linux",loadChildren:()=>import("./chunk-RCM5XFVU.js").then(o=>o.LinuxModule)},{path:"terminal",loadChildren:()=>import("./chunk-BDITCHXY.js").then(o=>o.TerminalModule)}],l=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[i.forChild(d),i]})}return o})();var p=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[l]})}return o})();export{p as PlatformToolsModule};
@@ -1 +1 @@
1
- import{g as r}from"./chunk-YMAWYUA6.js";import{Xa as e,fa as t}from"./chunk-V2XN5VIX.js";var u=[{path:"",loadComponent:()=>import("./chunk-YT7YOJIG.js").then(o=>o.LogsComponent)}],n=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[r.forChild(u),r]})}return o})();var p=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[n]})}return o})();export{p as LogsModule};
1
+ import{g as r}from"./chunk-YMAWYUA6.js";import{Xa as e,fa as t}from"./chunk-V2XN5VIX.js";var u=[{path:"",loadComponent:()=>import("./chunk-ET6IVHAD.js").then(o=>o.LogsComponent)}],n=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[r.forChild(u),r]})}return o})();var p=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[n]})}return o})();export{p as LogsModule};
@@ -1,4 +1,4 @@
1
- import{M as ne,P as oe,a as ue,b as R,c as te,d as b,e as S,f as ie,g as E,h as T,i as W,j as N}from"./chunk-SMAWZV6A.js";import{b as D}from"./chunk-74ETBIBO.js";import{Ac as L,Db as U,Ga as I,Gb as X,Ib as u,La as d,Mc as ee,Tb as F,Tc as A,Ub as _,Vb as w,Wa as O,Wb as Y,Xa as C,a as P,ab as v,b as $,ea as M,fa as y,g as pe,ha as J,ia as G,ja as f,kb as q,n as V,oa as K,pa as Q,rb as a,sb as p,tb as c,ub as g,wc as k,ya as H,yc as Z}from"./chunk-V2XN5VIX.js";var h=pe(ue(),1);function ce(i,n){if(i&1){let s=U();p(0,"button",6),X("click",function(){K(s);let o=u();return Q(o.removeItem())}),p(1,"span",7),w(2,"\xD7"),c(),p(3,"span"),w(4,"Close"),c()()}if(i&2){let s=u();_(s.widgetStyles().__remove_item__),d(3),_(s.widgetStyles().__screen_reader__)}}function me(i,n){if(i&1&&g(0,"p",8),i&2){let s=u(2);_(s.widgetStyles().__help_block__),a("innerHTML",s.options==null?null:s.options.helpBlock,I)}}function he(i,n){if(i&1&&(p(0,"div"),v(1,me,1,3,"p",3),c()),i&2){let s=u();d(),a("ngIf",s.options==null?null:s.options.helpBlock)}}function fe(i,n){if(i&1&&g(0,"label",8),i&2){let s,t=u();_((t.options==null?null:t.options.labelHtmlClass)||""),F("sr-only",t.options==null?null:t.options.notitle),a("innerHTML",t.options==null?null:t.options.title,I),q("for","control"+((s=t.layoutNode())==null?null:s._id))}}function ge(i,n){if(i&1&&(p(0,"p")(1,"strong"),w(2,"*"),c(),w(3," = required fields "),c()),i&2){let s=u();d(),_(s.widgetStyles().__required_asterisk__)}}function _e(i,n){if(i&1&&g(0,"span",8),i&2){let s=u();_(s.widgetStyles().__field_addon_left__),a("innerHTML",s.options==null?null:s.options.fieldAddonLeft,I)}}function be(i,n){if(i&1&&g(0,"span",8),i&2){let s=u();_(s.widgetStyles().__field_addon_right__),a("innerHTML",s.options==null?null:s.options.fieldAddonRight,I)}}function ye(i,n){if(i&1&&g(0,"span",9),i&2){let s=u();F("glyphicon-ok",(s.options==null?null:s.options.enableSuccessState)&&!(s.formControl!=null&&s.formControl.errors))("glyphicon-remove",(s.options==null?null:s.options.enableErrorState)&&(s.formControl==null?null:s.formControl.errors))}}function Ce(i,n){if(i&1&&g(0,"p",8),i&2){let s=u(2);_(s.widgetStyles().__help_block__),a("innerHTML",s.options==null?null:s.options.helpBlock,I)}}function ve(i,n){if(i&1&&(p(0,"div"),v(1,Ce,1,3,"p",3),c()),i&2){let s=u();d(),a("ngIf",s.options==null?null:s.options.helpBlock)}}function ke(i,n){if(i&1&&(p(0,"div"),w(1,"debug: "),p(2,"pre"),w(3),c()()),i&2){let s=u();d(3),Y(s.debugOutput)}}var j=(()=>{let n=class n{constructor(){this.frameworkThemeSubject=new V,this.frameworkTheme$=this.frameworkThemeSubject.asObservable()}requestThemeChange(t){this.frameworkThemeSubject.next(t),this.activeRequestedTheme=t}getActiveRequestedTheme(){return this.activeRequestedTheme}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=M({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})(),B=(()=>{let n=class n{applyCssClasses(t,o,e){let r=this.widgetStyles()[t];(!r||h.default.isEmpty(r))&&(r=this.widgetStyles().default),Object.keys(r).forEach(l=>{let m=r[l];m.length&&(o[l]=b(o[l],m)),e&&(o[l]=b(o[l],e))})}flattenWidgetStyles(t){var o={};let e=["__themes__"];return Object.keys(t).forEach(r=>{let l=t[r];if(e.indexOf(r)>=0){o[r]=l;return}h.default.isArray(l)&&(o[r]=l.join(" ")),h.default.isObject(l)&&(o[r]=o[r]||{},Object.keys(l).forEach(m=>{let x=l[m];h.default.isArray(x)?o[r][m]=x.join(" "):o[r][m]=x})),h.default.isString(l)&&(o[r]=l)}),o}constructor(){this.changeDetector=f(L),this.jsf=f(S),this.jsfFLService=f(T),this.cssFWService=f(j),this.frameworkInitialized=!1,this.formControl=null,this.debugOutput="",this.debug="",this.parentArray=null,this.isOrderable=!1,this.layoutNode=k(void 0),this.layoutIndex=k(void 0),this.dataIndex=k(void 0),this.widgetStyles=Z(void 0),this.defaultStyling={array:{},default:{fieldHtmlClass:"cssfw-form-control"},__themes__:[{name:"notheme",text:"None"}],__remove_item__:"cssfw-remove-item",__array_item_nonref__:{htmlClass:"cssfw-array-item-nonref"},__active__:{activeClass:"cssfw-active"},__array__:{htmlClass:"cssfw-array"},__control_label__:{labelHtmlClass:"cssfw-control-label"},__form_group__:{htmlClass:"cssfw-form-group"},__field_addon_left__:"cssfw-addon-left",__field_addon_right__:"cssfw-addon-right",__help_block__:"cssfw-help-block",__required_asterisk__:"cssfw-required-astersisk",__screen_reader__:"cssfw-screen-reader"};let t=this.cssFWService,e=this.jsfFLService.activeFramework.config||{};this.widgetStyles.set(Object.assign(this.defaultStyling,e.widgetstyles));let r=this.widgetStyles().__themes__[0],l=t.activeRequestedTheme||r.name;this.theme=this.options?.theme||l,this.frameworkThemeSubs=t.frameworkTheme$.subscribe(m=>{this.theme=m})}ngOnDestroy(){this.frameworkThemeSubs.unsubscribe(),this.frameworkThemeSubs=null}get showRemoveButton(){let t=this.layoutNode();return!this.options.removable||this.options.readonly||t.type==="$ref"?!1:t.recursiveReference?!0:!t.arrayItem||!this.parentArray||this.parentArray.items.length-1<=this.parentArray.options.minItems?!1:t.arrayItemType==="list"?!0:this.layoutIndex()[this.layoutIndex().length-1]===this.parentArray.items.length-2}ngOnInit(){this.initializeFramework();let t=this.layoutNode();t.arrayItem&&t.type!=="$ref"&&(this.parentArray=this.jsf.getParentNode(this),this.parentArray&&(this.isOrderable=t.arrayItemType==="list"&&!this.options.readonly&&this.parentArray.options.orderable))}ngOnChanges(){this.frameworkInitialized||this.initializeFramework()}initializeFramework(){let t=this.layoutNode();if(t){if(this.options=(0,h.cloneDeep)(t.options),this.widgetLayoutNode=$(P({},t),{options:(0,h.cloneDeep)(t.options)}),this.widgetOptions=this.widgetLayoutNode.options,this.formControl=this.jsf.getFormControl(this),this.options.isInputWidget=te(t.type,["button","checkbox","checkboxes-inline","checkboxes","color","date","datetime-local","datetime","email","file","hidden","image","integer","month","number","password","radio","radiobuttons","radios-inline","radios","range","reset","search","select","submit","tel","text","textarea","time","url","week"]),this.options.title=this.setTitle(),this.options.htmlClass=b(this.options.htmlClass,"schema-form-"+t.type),t.type==="array"?this.options.htmlClass=b(this.options.htmlClass,this.widgetStyles().__array__.htmlClass):t.arrayItem&&t.type!=="$ref"?this.options.htmlClass=b(this.options.htmlClass,this.widgetStyles().__array_item_nonref__.htmlClass):this.options.htmlClass=b(this.options.htmlClass,this.widgetStyles().__form_group__.htmlClass),this.widgetOptions.htmlClass="",this.options.labelHtmlClass=b(this.options.labelHtmlClass,this.widgetStyles().__control_label__.labelHtmlClass),this.widgetOptions.activeClass=b(this.widgetOptions.activeClass,this.widgetStyles().__active__.activeClass),this.options.fieldAddonLeft=this.options.fieldAddonLeft||this.options.prepend,this.options.fieldAddonRight=this.options.fieldAddonRight||this.options.append,this.options.title&&t.type!=="tab"&&!this.options.notitle&&this.options.required&&!this.options.title.includes("*")){let o=this.widgetStyles().__required_asterisk__||"text-danger";this.options.title+=` <strong class="${o}">*</strong>`}if(t.type=="optionfieldset"&&(this.options.messageLocation="top"),this.applyCssClasses(t.type,this.widgetOptions,this.options.style),this.formControl&&(this.updateHelpBlock(this.formControl.status),this.formControl.statusChanges.subscribe(o=>this.updateHelpBlock(o)),this.options.debug)){let o=[];this.debugOutput=(0,h.map)(o,e=>JSON.stringify(e,null,2)).join(`
1
+ import{M as ne,P as oe,a as ue,b as R,c as te,d as b,e as S,f as ie,g as E,h as T,i as W,j as N}from"./chunk-QTZTX2XP.js";import{b as D}from"./chunk-74ETBIBO.js";import{Ac as L,Db as U,Ga as I,Gb as X,Ib as u,La as d,Mc as ee,Tb as F,Tc as A,Ub as _,Vb as w,Wa as O,Wb as Y,Xa as C,a as P,ab as v,b as $,ea as M,fa as y,g as pe,ha as J,ia as G,ja as f,kb as q,n as V,oa as K,pa as Q,rb as a,sb as p,tb as c,ub as g,wc as k,ya as H,yc as Z}from"./chunk-V2XN5VIX.js";var h=pe(ue(),1);function ce(i,n){if(i&1){let s=U();p(0,"button",6),X("click",function(){K(s);let o=u();return Q(o.removeItem())}),p(1,"span",7),w(2,"\xD7"),c(),p(3,"span"),w(4,"Close"),c()()}if(i&2){let s=u();_(s.widgetStyles().__remove_item__),d(3),_(s.widgetStyles().__screen_reader__)}}function me(i,n){if(i&1&&g(0,"p",8),i&2){let s=u(2);_(s.widgetStyles().__help_block__),a("innerHTML",s.options==null?null:s.options.helpBlock,I)}}function he(i,n){if(i&1&&(p(0,"div"),v(1,me,1,3,"p",3),c()),i&2){let s=u();d(),a("ngIf",s.options==null?null:s.options.helpBlock)}}function fe(i,n){if(i&1&&g(0,"label",8),i&2){let s,t=u();_((t.options==null?null:t.options.labelHtmlClass)||""),F("sr-only",t.options==null?null:t.options.notitle),a("innerHTML",t.options==null?null:t.options.title,I),q("for","control"+((s=t.layoutNode())==null?null:s._id))}}function ge(i,n){if(i&1&&(p(0,"p")(1,"strong"),w(2,"*"),c(),w(3," = required fields "),c()),i&2){let s=u();d(),_(s.widgetStyles().__required_asterisk__)}}function _e(i,n){if(i&1&&g(0,"span",8),i&2){let s=u();_(s.widgetStyles().__field_addon_left__),a("innerHTML",s.options==null?null:s.options.fieldAddonLeft,I)}}function be(i,n){if(i&1&&g(0,"span",8),i&2){let s=u();_(s.widgetStyles().__field_addon_right__),a("innerHTML",s.options==null?null:s.options.fieldAddonRight,I)}}function ye(i,n){if(i&1&&g(0,"span",9),i&2){let s=u();F("glyphicon-ok",(s.options==null?null:s.options.enableSuccessState)&&!(s.formControl!=null&&s.formControl.errors))("glyphicon-remove",(s.options==null?null:s.options.enableErrorState)&&(s.formControl==null?null:s.formControl.errors))}}function Ce(i,n){if(i&1&&g(0,"p",8),i&2){let s=u(2);_(s.widgetStyles().__help_block__),a("innerHTML",s.options==null?null:s.options.helpBlock,I)}}function ve(i,n){if(i&1&&(p(0,"div"),v(1,Ce,1,3,"p",3),c()),i&2){let s=u();d(),a("ngIf",s.options==null?null:s.options.helpBlock)}}function ke(i,n){if(i&1&&(p(0,"div"),w(1,"debug: "),p(2,"pre"),w(3),c()()),i&2){let s=u();d(3),Y(s.debugOutput)}}var j=(()=>{let n=class n{constructor(){this.frameworkThemeSubject=new V,this.frameworkTheme$=this.frameworkThemeSubject.asObservable()}requestThemeChange(t){this.frameworkThemeSubject.next(t),this.activeRequestedTheme=t}getActiveRequestedTheme(){return this.activeRequestedTheme}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=M({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})(),B=(()=>{let n=class n{applyCssClasses(t,o,e){let r=this.widgetStyles()[t];(!r||h.default.isEmpty(r))&&(r=this.widgetStyles().default),Object.keys(r).forEach(l=>{let m=r[l];m.length&&(o[l]=b(o[l],m)),e&&(o[l]=b(o[l],e))})}flattenWidgetStyles(t){var o={};let e=["__themes__"];return Object.keys(t).forEach(r=>{let l=t[r];if(e.indexOf(r)>=0){o[r]=l;return}h.default.isArray(l)&&(o[r]=l.join(" ")),h.default.isObject(l)&&(o[r]=o[r]||{},Object.keys(l).forEach(m=>{let x=l[m];h.default.isArray(x)?o[r][m]=x.join(" "):o[r][m]=x})),h.default.isString(l)&&(o[r]=l)}),o}constructor(){this.changeDetector=f(L),this.jsf=f(S),this.jsfFLService=f(T),this.cssFWService=f(j),this.frameworkInitialized=!1,this.formControl=null,this.debugOutput="",this.debug="",this.parentArray=null,this.isOrderable=!1,this.layoutNode=k(void 0),this.layoutIndex=k(void 0),this.dataIndex=k(void 0),this.widgetStyles=Z(void 0),this.defaultStyling={array:{},default:{fieldHtmlClass:"cssfw-form-control"},__themes__:[{name:"notheme",text:"None"}],__remove_item__:"cssfw-remove-item",__array_item_nonref__:{htmlClass:"cssfw-array-item-nonref"},__active__:{activeClass:"cssfw-active"},__array__:{htmlClass:"cssfw-array"},__control_label__:{labelHtmlClass:"cssfw-control-label"},__form_group__:{htmlClass:"cssfw-form-group"},__field_addon_left__:"cssfw-addon-left",__field_addon_right__:"cssfw-addon-right",__help_block__:"cssfw-help-block",__required_asterisk__:"cssfw-required-astersisk",__screen_reader__:"cssfw-screen-reader"};let t=this.cssFWService,e=this.jsfFLService.activeFramework.config||{};this.widgetStyles.set(Object.assign(this.defaultStyling,e.widgetstyles));let r=this.widgetStyles().__themes__[0],l=t.activeRequestedTheme||r.name;this.theme=this.options?.theme||l,this.frameworkThemeSubs=t.frameworkTheme$.subscribe(m=>{this.theme=m})}ngOnDestroy(){this.frameworkThemeSubs.unsubscribe(),this.frameworkThemeSubs=null}get showRemoveButton(){let t=this.layoutNode();return!this.options.removable||this.options.readonly||t.type==="$ref"?!1:t.recursiveReference?!0:!t.arrayItem||!this.parentArray||this.parentArray.items.length-1<=this.parentArray.options.minItems?!1:t.arrayItemType==="list"?!0:this.layoutIndex()[this.layoutIndex().length-1]===this.parentArray.items.length-2}ngOnInit(){this.initializeFramework();let t=this.layoutNode();t.arrayItem&&t.type!=="$ref"&&(this.parentArray=this.jsf.getParentNode(this),this.parentArray&&(this.isOrderable=t.arrayItemType==="list"&&!this.options.readonly&&this.parentArray.options.orderable))}ngOnChanges(){this.frameworkInitialized||this.initializeFramework()}initializeFramework(){let t=this.layoutNode();if(t){if(this.options=(0,h.cloneDeep)(t.options),this.widgetLayoutNode=$(P({},t),{options:(0,h.cloneDeep)(t.options)}),this.widgetOptions=this.widgetLayoutNode.options,this.formControl=this.jsf.getFormControl(this),this.options.isInputWidget=te(t.type,["button","checkbox","checkboxes-inline","checkboxes","color","date","datetime-local","datetime","email","file","hidden","image","integer","month","number","password","radio","radiobuttons","radios-inline","radios","range","reset","search","select","submit","tel","text","textarea","time","url","week"]),this.options.title=this.setTitle(),this.options.htmlClass=b(this.options.htmlClass,"schema-form-"+t.type),t.type==="array"?this.options.htmlClass=b(this.options.htmlClass,this.widgetStyles().__array__.htmlClass):t.arrayItem&&t.type!=="$ref"?this.options.htmlClass=b(this.options.htmlClass,this.widgetStyles().__array_item_nonref__.htmlClass):this.options.htmlClass=b(this.options.htmlClass,this.widgetStyles().__form_group__.htmlClass),this.widgetOptions.htmlClass="",this.options.labelHtmlClass=b(this.options.labelHtmlClass,this.widgetStyles().__control_label__.labelHtmlClass),this.widgetOptions.activeClass=b(this.widgetOptions.activeClass,this.widgetStyles().__active__.activeClass),this.options.fieldAddonLeft=this.options.fieldAddonLeft||this.options.prepend,this.options.fieldAddonRight=this.options.fieldAddonRight||this.options.append,this.options.title&&t.type!=="tab"&&!this.options.notitle&&this.options.required&&!this.options.title.includes("*")){let o=this.widgetStyles().__required_asterisk__||"text-danger";this.options.title+=` <strong class="${o}">*</strong>`}if(t.type=="optionfieldset"&&(this.options.messageLocation="top"),this.applyCssClasses(t.type,this.widgetOptions,this.options.style),this.formControl&&(this.updateHelpBlock(this.formControl.status),this.formControl.statusChanges.subscribe(o=>this.updateHelpBlock(o)),this.options.debug)){let o=[];this.debugOutput=(0,h.map)(o,e=>JSON.stringify(e,null,2)).join(`
2
2
  `)}this.frameworkInitialized=!0}}updateHelpBlock(t){this.options.helpBlock=t==="INVALID"&&this.options.enableErrorState&&this.formControl.errors&&(this.formControl.dirty||this.options.feedbackOnRender)?this.jsf.formatErrors(this.formControl.errors,this.options.validationMessages):this.options.description||this.options.help||null}setTitle(){switch(this.layoutNode().type){case"button":case"checkbox":case"section":case"help":case"msg":case"submit":case"message":case"tabarray":case"tabs":case"$ref":return null;case"advancedfieldset":return this.widgetOptions.expandable=!0,this.widgetOptions.title="Advanced options",null;case"authfieldset":return this.widgetOptions.expandable=!0,this.widgetOptions.title="Authentication settings",null;case"fieldset":return this.widgetOptions.title=this.options.title,null;case"array":return this.widgetOptions.title=this.options.title,null;default:return this.widgetOptions.title=null,this.jsf.setItemTitle(this)}}removeItem(){this.jsf.removeItem(this)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=O({type:n,selectors:[["css-framework"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"],widgetStyles:[1,"widgetStyles"]},outputs:{widgetStyles:"widgetStylesChange"},standalone:!1,features:[H],decls:12,vars:24,consts:[["type","button",3,"class","click",4,"ngIf"],[4,"ngIf"],[3,"class","sr-only","innerHTML",4,"ngIf"],[3,"class","innerHTML",4,"ngIf"],[3,"layoutNode","dataIndex","layoutIndex"],["aria-hidden","true","class","form-control-feedback glyphicon",3,"glyphicon-ok","glyphicon-remove",4,"ngIf"],["type","button",3,"click"],["aria-hidden","true"],[3,"innerHTML"],["aria-hidden","true",1,"form-control-feedback","glyphicon"]],template:function(o,e){if(o&1&&(p(0,"div"),v(1,ce,5,4,"button",0)(2,he,2,1,"div",1)(3,fe,1,6,"label",2)(4,ge,4,2,"p",1),p(5,"div"),v(6,_e,1,3,"span",3),g(7,"select-widget-widget",4),v(8,be,1,3,"span",3),c(),v(9,ye,1,4,"span",5)(10,ve,2,1,"div",1),c(),v(11,ke,4,1,"div",1)),o&2){let r,l,m,x;_((e.options==null?null:e.options.htmlClass)||""),F("has-feedback",(e.options==null?null:e.options.feedback)&&(e.options==null?null:e.options.isInputWidget)&&((e.formControl==null?null:e.formControl.dirty)||(e.options==null?null:e.options.feedbackOnRender)))("has-error",(e.options==null?null:e.options.enableErrorState)&&(e.formControl==null?null:e.formControl.errors)&&((e.formControl==null?null:e.formControl.dirty)||(e.options==null?null:e.options.feedbackOnRender)))("has-success",(e.options==null?null:e.options.enableSuccessState)&&!(e.formControl!=null&&e.formControl.errors)&&((e.formControl==null?null:e.formControl.dirty)||(e.options==null?null:e.options.feedbackOnRender))),q("data-bs-theme",e.theme)("data-theme",e.theme),d(),a("ngIf",e.showRemoveButton),d(),a("ngIf",(e.options==null?null:e.options.messageLocation)==="top"&&((r=e.layoutNode())==null?null:r.type)!=="array"),d(),a("ngIf",(e.options==null?null:e.options.title)&&((l=e.layoutNode())==null?null:l.type)!=="tab"&&((l=e.layoutNode())==null?null:l.type)!=="array"),d(),a("ngIf",((m=e.layoutNode())==null?null:m.type)==="submit"&&(e.jsf==null||e.jsf.formOptions==null?null:e.jsf.formOptions.fieldsRequired)),d(),F("input-group",(e.options==null?null:e.options.fieldAddonLeft)||(e.options==null?null:e.options.fieldAddonRight)),d(),a("ngIf",e.options==null?null:e.options.fieldAddonLeft),d(),a("layoutNode",e.widgetLayoutNode)("dataIndex",e.dataIndex())("layoutIndex",e.layoutIndex()),d(),a("ngIf",e.options==null?null:e.options.fieldAddonRight),d(),a("ngIf",(e.options==null?null:e.options.feedback)&&(e.options==null?null:e.options.isInputWidget)&&!(e.options!=null&&e.options.fieldAddonRight)&&!e.layoutNode().arrayItem&&((e.formControl==null?null:e.formControl.dirty)||(e.options==null?null:e.options.feedbackOnRender))),d(),a("ngIf",(e.options==null?null:e.options.messageLocation)!=="top"&&((x=e.layoutNode())==null?null:x.type)!=="array"),d(),a("ngIf",e.debug&&e.debugOutput)}},dependencies:[ie,ee],styles:[`:host ::ng-deep .list-group-item .form-control-feedback{top:40px}:host ::ng-deep .checkbox,:host ::ng-deep .radio{margin-top:0;margin-bottom:0}:host ::ng-deep .checkbox-inline,:host ::ng-deep .checkbox-inline+.checkbox-inline,:host ::ng-deep .checkbox-inline+.radio-inline,:host ::ng-deep .radio-inline,:host ::ng-deep .radio-inline+.radio-inline,:host ::ng-deep .radio-inline+.checkbox-inline{margin-left:0;margin-right:10px}:host ::ng-deep .checkbox-inline:last-child,:host ::ng-deep .radio-inline:last-child{margin-right:0}:host ::ng-deep .ng-invalid.ng-touched{border:1px solid #f44336}.checkbox-inline,.checkbox-inline+.checkbox-inline,.checkbox-inline+.radio-inline,.radio-inline,.radio-inline+.radio-inline,.radio-inline+.checkbox-inline{margin-left:0;margin-right:10px}.checkbox-inline:last-child,.radio-inline:last-child{margin-right:0}.ng-invalid.ng-touched{border:1px solid #f44336}
3
3
  `],encapsulation:2});let i=n;return i})(),we=new J("CSS_FRAMEWORK_CFG"),se;(function(i){class n{}i.csscategories=n})(se||(se={}));var le=(()=>{let n=class n{};n.\u0275fac=function(o){return new(o||n)},n.\u0275mod=C({type:n}),n.\u0275inj=y({providers:[S,T,E,j],imports:[N,A,W]});let i=n;return i})(),re=(()=>{let n=class n extends R{constructor(t){super(),this.cssFWService=f(j),this.name="css",this.framework=B,this.name=t.name,this.text=t.text||this.name,this.stylesheets=t.stylesheets,this.scripts=t.scripts,this.config=t,this.widgets=t.widgets}getActiveTheme(){let t=this.cssFWService.getActiveRequestedTheme(),o=this.config?.widgetstyles?.__themes__,e=o&&o[0];if(t&&(e={name:t,text:t},o)){let r=o.filter(l=>l.name==t);e=r&&r[0]||e}return e}requestThemeChange(t){this.cssFWService.requestThemeChange(t)}registerTheme(t,o=!0){let r=(this.config?.widgetstyles?.__themes__||[]).filter(l=>t.name==l.name);if(r&&r[0]){if(o)return r[0].text=t.text,!0;if(!o)return!1}if(!r||r.length==0){let l=this.config;return l.widgetstyles=this.config.widgetstyles||{},l.widgetstyles.__themes__=l.widgetstyles.__themes__||[],l.widgetstyles.__themes__.push(t),!0}}unregisterTheme(t){let o=this.config?.widgetstyles?.__themes__,e=-1;return o&&(o.forEach((r,l)=>{t==r.name&&(e=l)}),e>=0)?(o.splice(e,1),!0):!1}getConfig(){return this.config}};n.\u0275fac=function(o){return new(o||n)(G(we))},n.\u0275prov=M({token:n,factory:n.\u0275fac});let i=n;return i})();var Ie=(()=>{let n=class n{constructor(){this.changeDetector=f(L),this.jsf=f(S),this.frameworkInitialized=!1,this.formControl=null,this.debugOutput="",this.debug="",this.parentArray=null,this.isOrderable=!1,this.layoutNode=k(void 0),this.layoutIndex=k(void 0),this.dataIndex=k(void 0)}ngOnInit(){}ngOnChanges(){}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=O({type:n,selectors:[["bootstrap-5-framework"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,features:[H],decls:2,vars:3,consts:[[3,"layoutNode","layoutIndex","dataIndex"]],template:function(o,e){o&1&&(p(0,"div"),g(1,"css-framework",0),c()),o&2&&(d(),a("layoutNode",e.layoutNode())("layoutIndex",e.layoutIndex())("dataIndex",e.dataIndex()))},dependencies:[B],styles:[`:host ::ng-deep .list-group-item .list-group-item-hb .form-control-feedback{top:40px}:host ::ng-deep .checkbox,:host ::ng-deep .radio{margin-top:0;margin-bottom:0}:host ::ng-deep .checkbox-inline,:host ::ng-deep .checkbox-inline+.checkbox-inline,:host ::ng-deep .checkbox-inline+.radio-inline,:host ::ng-deep .radio-inline,:host ::ng-deep .radio-inline+.radio-inline,:host ::ng-deep .radio-inline+.checkbox-inline{margin-left:0;margin-right:10px}:host ::ng-deep .checkbox-inline:last-child,:host ::ng-deep .radio-inline:last-child{margin-right:0}:host ::ng-deep .ng-invalid.ng-touched{border:1px solid #f44336}.input-group .form-control:first-child,.input-group-text:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-text:first-child{border-right:0}.input-group .form-control:last-child,.input-group-text:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text:last-child{border-left:0}.input-group .form-control:not(:first-child):not(:last-child),.input-group-text:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.btn-close>span:first-child{display:none}
4
4
  `],encapsulation:2});let i=n;return i})(),Se={name:"bootstrap-5",text:"Bootstrap 5",scripts:["//cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"],stylesheets:["//cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css"],widgetstyles:{__themes__:[{name:"bootstrap5_default",text:"Bootstrap5 default"},{name:"dark",text:"Dark"},{name:"light",text:"Light"}],$ref:{fieldHtmlClass:"btn btn-primary"},__array_item_nonref__:{htmlClass:"list-group-item list-group-item-hb"},__form_group__:{htmlClass:"form-group"},__control_label__:{labelHtmlClass:"control-label"},__active__:{activeClass:"active"},__required_asterisk__:"text-danger",__screen_reader__:"visually-hidden",__remove_item__:"btn-close float-end",__help_block__:"help-block grey-text small",__field_addon_left__:"input-group-text",__field_addon_right__:"input-group-text","alt-date":{},"alt-datetime":{},__array__:{htmlClass:"list-group list-group-hb"},array:{},authfieldset:{},advancedfieldset:{},button:{fieldHtmlClass:"btn btn-sm btn-primary"},checkbox:{fieldHtmlClass:"form-check-input"},checkboxes:{fieldHtmlClass:"form-check-input"},checkboxbuttons:{fieldHtmlClass:"visually-hidden",htmlClass:"btn-group",itemLabelHtmlClass:"btn"},"checkboxes-inline":{htmlClass:"form-check-input",itemLabelHtmlClass:"form-check-inline"},date:{},"datetime-local":{},fieldset:{},integer:{},number:{},optionfieldset:{},password:{},radiobuttons:{fieldHtmlClass:"visually-hidden",htmlClass:"btn-group",itemLabelHtmlClass:"btn"},radio:{fieldHtmlClass:"form-check-input"},radios:{fieldHtmlClass:"form-check-input"},"radios-inline":{htmlClass:"form-check form-check-inline",itemLabelHtmlClass:"form-check-label"},range:{},section:{},selectfieldset:{},select:{fieldHtmlClass:"form-select"},submit:{fieldHtmlClass:"btn btn-primary"},text:{},tabs:{labelHtmlClass:"nav nav-tabs",htmlClass:"tab-content",fieldHtmlClass:"tab-pane",widget_radioClass:"form-check-input"},tabarray:{labelHtmlClass:"nav nav-tabs",htmlClass:"tab-content",fieldHtmlClass:"tab-pane",widget_radioClass:"form-check-input"},"one-of":{labelHtmlClass:"nav nav-tabs",htmlClass:"tab-content",fieldHtmlClass:"tab-pane",widget_radioClass:"form-check-input"},textarea:{},default:{fieldHtmlClass:"form-control"}}},Me=(()=>{let n=class n extends re{constructor(){let t=f(j);super(Se),this.framework=Ie,this.cssFWService=t}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=M({token:n,factory:n.\u0275fac});let i=n;return i})(),ae=(()=>{let n=class n{};n.\u0275fac=function(o){return new(o||n)},n.\u0275mod=C({type:n}),n.\u0275inj=y({providers:[S,T,E,{provide:R,useClass:Me,multi:!0}],imports:[N,A,W,le,N]});let i=n;return i})();var de=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=C({type:i});static \u0275inj=y({providers:[ne],imports:[ae,D]})}return i})();var it=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=C({type:i});static \u0275inj=y({providers:[oe],imports:[D,de]})}return i})();export{it as a};
@@ -1 +1 @@
1
- import{b as n}from"./chunk-7QJGKHFT.js";import{d as u}from"./chunk-YMAWYUA6.js";import{b as m}from"./chunk-DZDDCNNF.js";import{k as c,n as h,p as f}from"./chunk-PMS4BD4M.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-4X7L4KQL.js";import{d as u}from"./chunk-YMAWYUA6.js";import{b as m}from"./chunk-64F5HSDQ.js";import{k as c,n as h,p as f}from"./chunk-NRHD2BXN.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 +1 @@
1
- import{a as n}from"./chunk-UE6YZHXO.js";import{g as i}from"./chunk-YMAWYUA6.js";import"./chunk-DZDDCNNF.js";import"./chunk-PMS4BD4M.js";import{Xa as r,fa as o}from"./chunk-V2XN5VIX.js";var a=[{path:"",loadComponent:()=>import("./chunk-TSP2UOFU.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-6LIDOYQ5.js";import{g as i}from"./chunk-YMAWYUA6.js";import"./chunk-64F5HSDQ.js";import"./chunk-NRHD2BXN.js";import{Xa as r,fa as o}from"./chunk-V2XN5VIX.js";var a=[{path:"",loadComponent:()=>import("./chunk-JFZ2A252.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,4 +1,4 @@
1
- import{a as P}from"./chunk-ECQJTOVP.js";import{a as z}from"./chunk-I5TETZ3I.js";import{B as $,c as E,e as y,l as k}from"./chunk-F7ZV2JBO.js";import{b as D}from"./chunk-YMAWYUA6.js";import{b as O}from"./chunk-DZDDCNNF.js";import{k as T,n as I,q as H}from"./chunk-PMS4BD4M.js";import{Db as g,Gb as _,Ib as a,La as p,Vb as v,Wa as x,ac as b,bc as M,cc as V,h as S,ja as r,lb as m,mb as u,oa as l,pa as c,rb as f,sb as d,tb as s,ub as w,w as C}from"./chunk-V2XN5VIX.js";function A(i,h){i&1&&w(0,"i",6)}function L(i,h){i&1&&w(0,"i",7)}function F(i,h){if(i&1){let t=g();d(0,"ngx-monaco-editor",10),_("onInit",function(e){l(t);let o=a();return c(o.onEditorInit(e))})("keydown.control.s",function(e){l(t);let o=a();return e.preventDefault(),c(o.onSave())})("keydown.meta.s",function(e){l(t);let o=a();return e.preventDefault(),c(o.onSave())}),s()}if(i&2){let t=a();f("options",t.editorOptions)("model",t.monacoEditorModel)}}function W(i,h){if(i&1){let t=g();d(0,"textarea",11),V("ngModelChange",function(e){l(t);let o=a();return M(o.startupScript,e)||(o.startupScript=e),c(e)}),v(1," "),s()}if(i&2){let t=a();b("ngModel",t.startupScript)}}var tt=(()=>{class i{$api=r(H);$md=r(z);$route=r(D);$settings=r(O);$toastr=r(I);$translate=r(T);lastHeight;visualViewPortEventCallback;startupScript;saveInProgress;isMobile=!1;options={printMargin:!1};monacoEditor;editorOptions;monacoEditorModel;constructor(){this.isMobile=this.$md.detect.mobile()}ngOnInit(){this.editorOptions={language:"shell",theme:this.$settings.actualLightingMode==="dark"?"vs-dark":"vs-light"},this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.$route.data.subscribe(t=>{this.startupScript=t.startupScript.script}),this.monacoEditorModel={value:"",language:"shell"}}onEditorInit(t){this.monacoEditor=t,this.monacoEditor.getModel().setValue(this.startupScript)}onSave(){return S(this,null,function*(){if(!this.saveInProgress){if(this.saveInProgress=!0,this.isMobile||(yield this.monacoEditor.getAction("editor.action.formatDocument").run(),this.startupScript=this.monacoEditor.getModel().getValue()),!["#!/bin/sh","#!/bin/bash"].includes(this.startupScript.split(`
1
+ import{a as P}from"./chunk-ECQJTOVP.js";import{a as z}from"./chunk-I5TETZ3I.js";import{B as $,c as E,e as y,l as k}from"./chunk-F7ZV2JBO.js";import{b as D}from"./chunk-YMAWYUA6.js";import{b as O}from"./chunk-64F5HSDQ.js";import{k as T,n as I,q as H}from"./chunk-NRHD2BXN.js";import{Db as g,Gb as _,Ib as a,La as p,Vb as v,Wa as x,ac as b,bc as M,cc as V,h as S,ja as r,lb as m,mb as u,oa as l,pa as c,rb as f,sb as d,tb as s,ub as w,w as C}from"./chunk-V2XN5VIX.js";function A(i,h){i&1&&w(0,"i",6)}function L(i,h){i&1&&w(0,"i",7)}function F(i,h){if(i&1){let t=g();d(0,"ngx-monaco-editor",10),_("onInit",function(e){l(t);let o=a();return c(o.onEditorInit(e))})("keydown.control.s",function(e){l(t);let o=a();return e.preventDefault(),c(o.onSave())})("keydown.meta.s",function(e){l(t);let o=a();return e.preventDefault(),c(o.onSave())}),s()}if(i&2){let t=a();f("options",t.editorOptions)("model",t.monacoEditorModel)}}function W(i,h){if(i&1){let t=g();d(0,"textarea",11),V("ngModelChange",function(e){l(t);let o=a();return M(o.startupScript,e)||(o.startupScript=e),c(e)}),v(1," "),s()}if(i&2){let t=a();b("ngModel",t.startupScript)}}var tt=(()=>{class i{$api=r(H);$md=r(z);$route=r(D);$settings=r(O);$toastr=r(I);$translate=r(T);lastHeight;visualViewPortEventCallback;startupScript;saveInProgress;isMobile=!1;options={printMargin:!1};monacoEditor;editorOptions;monacoEditorModel;constructor(){this.isMobile=this.$md.detect.mobile()}ngOnInit(){this.editorOptions={language:"shell",theme:this.$settings.actualLightingMode==="dark"?"vs-dark":"vs-light"},this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.$route.data.subscribe(t=>{this.startupScript=t.startupScript.script}),this.monacoEditorModel={value:"",language:"shell"}}onEditorInit(t){this.monacoEditor=t,this.monacoEditor.getModel().setValue(this.startupScript)}onSave(){return S(this,null,function*(){if(!this.saveInProgress){if(this.saveInProgress=!0,this.isMobile||(yield this.monacoEditor.getAction("editor.action.formatDocument").run(),this.startupScript=this.monacoEditor.getModel().getValue()),!["#!/bin/sh","#!/bin/bash"].includes(this.startupScript.split(`
2
2
  `)[0].trim())){this.$toastr.error(this.$translate.instant("platform.docker.must_use_hashbang"),this.$translate.instant("toast.title_error")),this.startupScript=`#!/bin/sh
3
3
 
4
4
  ${this.startupScript}`,this.isMobile||this.monacoEditor.getModel().setValue(this.startupScript),this.saveInProgress=!1;return}try{yield C(this.$api.put("/platform-tools/docker/startup-script",{script:this.startupScript})),this.$toastr.success(this.$translate.instant("platform.docker.restart_required"),this.$translate.instant("platform.docker.script_saved"))}catch(t){console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}this.saveInProgress=!1}})}ngOnDestroy(){window.visualViewport&&(window.visualViewport.removeEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.enableTouchMove()),this.monacoEditor&&this.monacoEditor.dispose()}visualViewPortChanged(){this.lastHeight<window.visualViewport.height&&document.activeElement.blur(),window.visualViewport.height<window.innerHeight?(this.$md.enableTouchMove(),this.lastHeight=window.visualViewport.height):window.visualViewport.height===window.innerHeight&&(this.$md.disableTouchMove(),this.lastHeight=window.visualViewport.height)}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=x({type:i,selectors:[["ng-component"]],decls:11,vars:4,consts:[[1,"flex-column","d-flex","align-items-stretch","h-100"],[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0","font-monospace"],[1,"col-6","text-end"],[1,"btn","btn-primary","waves-effect","m-0",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],[1,"fas","fa-fw","fa-floppy-disk"],[1,"flex-grow-1","h-100","w-100","my-2",3,"options","model"],["wrap","off","autocomplete","off","autocorrect","off","autocapitalize","off","spellcheck","false",1,"hb-plain-text-editor","align-self-end","h-100","w-100","my-2",3,"ngModel"],[1,"flex-grow-1","h-100","w-100","my-2",3,"onInit","keydown.control.s","keydown.meta.s","options","model"],["wrap","off","autocomplete","off","autocorrect","off","autocapitalize","off","spellcheck","false",1,"hb-plain-text-editor","align-self-end","h-100","w-100","my-2",3,"ngModelChange","ngModel"]],template:function(n,e){n&1&&(d(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3",3),v(4,"startup.sh"),s()(),d(5,"div",4)(6,"button",5),_("click",function(){return e.onSave()}),m(7,A,1,0,"i",6)(8,L,1,0,"i",7),s()()(),m(9,F,1,2,"ngx-monaco-editor",8),m(10,W,2,1,"textarea",9),s()),n&2&&(p(6),f("disabled",e.saveInProgress),p(),u(e.saveInProgress?7:8),p(2),u(e.isMobile?-1:9),p(),u(e.isMobile?10:-1))},dependencies:[P,$,E,y,k],encapsulation:2})}return i})();export{tt as StartupScriptComponent};
@@ -1 +1 @@
1
- import{a as _,b as D}from"./chunk-DZDDCNNF.js";import{p as c,q as S}from"./chunk-PMS4BD4M.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-64F5HSDQ.js";import{p as c,q as S}from"./chunk-NRHD2BXN.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{g as i}from"./chunk-YMAWYUA6.js";import{Xa as r,fa as o}from"./chunk-V2XN5VIX.js";var m=[{path:"",loadComponent:()=>import("./chunk-W5MMQVTG.js").then(t=>t.SupportComponent)}],n=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({imports:[i.forChild(m),i]})}return t})();var s=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({imports:[n]})}return t})();export{s as SupportModule};
1
+ import{g as i}from"./chunk-YMAWYUA6.js";import{Xa as r,fa as o}from"./chunk-V2XN5VIX.js";var m=[{path:"",loadComponent:()=>import("./chunk-KCDOWEBJ.js").then(t=>t.SupportComponent)}],n=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({imports:[i.forChild(m),i]})}return t})();var s=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({imports:[n]})}return t})();export{s as SupportModule};
@@ -1 +1 @@
1
- import{k as tt,n as et,q as it}from"./chunk-PMS4BD4M.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-NRHD2BXN.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{d as n}from"./chunk-YMAWYUA6.js";import{b as s}from"./chunk-DZDDCNNF.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-64F5HSDQ.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{d as u,g as n}from"./chunk-YMAWYUA6.js";import{k as f,n as l,q as d}from"./chunk-PMS4BD4M.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-3HJ7QT3X.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-NRHD2BXN.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-HFGCMLED.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};