homebridge-config-ui-x 5.9.0 → 5.9.1-beta.0

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 (137) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/core/auth/auth.controller.d.ts +5 -0
  3. package/dist/core/config/config.interfaces.d.ts +13 -0
  4. package/dist/core/config/config.service.d.ts +9 -0
  5. package/dist/core/config/config.service.js +18 -0
  6. package/dist/core/config/config.service.js.map +1 -1
  7. package/dist/core/config/config.startup.js +48 -17
  8. package/dist/core/config/config.startup.js.map +1 -1
  9. package/dist/core/feature-flags/feature-flags.registry.js +5 -0
  10. package/dist/core/feature-flags/feature-flags.registry.js.map +1 -1
  11. package/dist/core/spa/spa-html.service.d.ts +5 -0
  12. package/dist/core/spa/spa-html.service.js +38 -0
  13. package/dist/core/spa/spa-html.service.js.map +1 -0
  14. package/dist/core/spa/spa.filter.d.ts +3 -0
  15. package/dist/core/spa/spa.filter.js +21 -2
  16. package/dist/core/spa/spa.filter.js.map +1 -1
  17. package/dist/core/ssl/ssl-cert-generator.service.d.ts +15 -0
  18. package/dist/core/ssl/ssl-cert-generator.service.js +127 -0
  19. package/dist/core/ssl/ssl-cert-generator.service.js.map +1 -0
  20. package/dist/globalDefaults.js +3 -0
  21. package/dist/globalDefaults.js.map +1 -1
  22. package/dist/main.js +18 -4
  23. package/dist/main.js.map +1 -1
  24. package/dist/modules/child-bridges/child-bridges.interfaces.d.ts +9 -0
  25. package/dist/modules/config-editor/config-editor.controller.d.ts +3 -0
  26. package/dist/modules/config-editor/config-editor.controller.js +45 -1
  27. package/dist/modules/config-editor/config-editor.controller.js.map +1 -1
  28. package/dist/modules/config-editor/config-editor.module.js +2 -0
  29. package/dist/modules/config-editor/config-editor.module.js.map +1 -1
  30. package/dist/modules/config-editor/config-editor.service.d.ts +8 -2
  31. package/dist/modules/config-editor/config-editor.service.js +46 -3
  32. package/dist/modules/config-editor/config-editor.service.js.map +1 -1
  33. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js +1 -1
  34. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js.map +1 -1
  35. package/dist/modules/plugins/plugins.service.js +15 -0
  36. package/dist/modules/plugins/plugins.service.js.map +1 -1
  37. package/dist/modules/server/server.controller.d.ts +20 -0
  38. package/dist/modules/server/server.controller.js +86 -1
  39. package/dist/modules/server/server.controller.js.map +1 -1
  40. package/dist/modules/server/server.service.d.ts +18 -0
  41. package/dist/modules/server/server.service.js +257 -14
  42. package/dist/modules/server/server.service.js.map +1 -1
  43. package/dist/modules/status/status.gateway.d.ts +2 -0
  44. package/dist/modules/status/status.interfaces.d.ts +11 -0
  45. package/dist/modules/status/status.service.d.ts +4 -1
  46. package/dist/modules/status/status.service.js +21 -2
  47. package/dist/modules/status/status.service.js.map +1 -1
  48. package/package.json +3 -1
  49. package/public/assets/matter.svg +8 -0
  50. package/public/assets/plugin-ui-utils/ui.js +3 -0
  51. package/public/assets/plugin-ui-utils/ui.js.map +1 -1
  52. package/public/chunk-2ADAW5AD.js +1 -0
  53. package/public/{chunk-KW266TAV.js → chunk-2MFBHUTD.js} +1 -1
  54. package/public/{chunk-PK7EWRSF.js → chunk-2UQL2OTF.js} +1 -1
  55. package/public/chunk-2Y63WBU6.js +1 -0
  56. package/public/chunk-4AWJ2PWG.js +1 -0
  57. package/public/{chunk-FW6YLROT.js → chunk-4DVF333O.js} +1 -1
  58. package/public/{chunk-5R3NYRBJ.js → chunk-4E4YMHG4.js} +1 -1
  59. package/public/{chunk-EUGVBS4N.js → chunk-4H7ODI34.js} +1 -1
  60. package/public/{chunk-UHOVCHON.js → chunk-5G7T74GR.js} +1 -1
  61. package/public/{chunk-ICEM4QHU.js → chunk-5T6O4JCR.js} +1 -1
  62. package/public/{chunk-IDDSROZF.js → chunk-5W7EKO7F.js} +1 -1
  63. package/public/{chunk-UGSDROFZ.js → chunk-5WTTTYNS.js} +1 -1
  64. package/public/{chunk-VB3KKHCI.js → chunk-7F6JT34E.js} +1 -1
  65. package/public/{chunk-LTQGLD2K.js → chunk-AO7VT6PL.js} +1 -1
  66. package/public/{chunk-M4T2RO3I.js → chunk-AOALMLGY.js} +1 -1
  67. package/public/{chunk-LWOAR6BY.js → chunk-B5Z4M7ZJ.js} +1 -1
  68. package/public/chunk-BI2TS6NN.js +4 -0
  69. package/public/{chunk-X3DENUZZ.js → chunk-BQTGMLQB.js} +1 -1
  70. package/public/{chunk-3PJWBNGU.js → chunk-BVTPAZF3.js} +1 -1
  71. package/public/{chunk-AYMJQ6UO.js → chunk-CWTDHTPI.js} +1 -1
  72. package/public/{chunk-PYFU3YSX.js → chunk-D4LRW76J.js} +1 -1
  73. package/public/{chunk-X2HK2VP5.js → chunk-DIWD6B4C.js} +1 -1
  74. package/public/{chunk-6W43YCZG.js → chunk-DL2QDFLD.js} +1 -1
  75. package/public/{chunk-IESBL4DA.js → chunk-E4ZKIFZH.js} +1 -1
  76. package/public/{chunk-75E7S6CO.js → chunk-E7S36RMO.js} +1 -1
  77. package/public/chunk-EHHNHG6Q.js +1 -0
  78. package/public/{chunk-5WH5JZQ5.js → chunk-EYO3XCE2.js} +1 -1
  79. package/public/{chunk-TCYDYM5A.js → chunk-FGS4HIPD.js} +1 -1
  80. package/public/{chunk-CUP4YO7L.js → chunk-FOSFENMV.js} +1 -1
  81. package/public/chunk-HERKNFLL.js +16 -0
  82. package/public/chunk-HVGUNGBB.js +1 -0
  83. package/public/chunk-I3QQTGGZ.js +1 -0
  84. package/public/chunk-IBO6BDNZ.js +1 -0
  85. package/public/{chunk-2JSU6A57.js → chunk-IEO2AG2N.js} +1 -1
  86. package/public/{chunk-5PCQVX7H.js → chunk-IKY3F7MM.js} +1 -1
  87. package/public/{chunk-WHIRPY75.js → chunk-ISV4M72Q.js} +1 -1
  88. package/public/{chunk-U3JDCGCU.js → chunk-IXIZVUXX.js} +1 -1
  89. package/public/{chunk-MMLBIEDP.js → chunk-JWCVCB6V.js} +2 -2
  90. package/public/{chunk-7PXKC75G.js → chunk-JWHZQ7YI.js} +1 -1
  91. package/public/{chunk-WZ6CFZR4.js → chunk-JWY7RFE6.js} +1 -1
  92. package/public/chunk-LGE6SGDN.js +1 -0
  93. package/public/{chunk-MFEME63Q.js → chunk-LI4BZAUI.js} +1 -1
  94. package/public/{chunk-EV5RCPGM.js → chunk-NIERW5KT.js} +1 -1
  95. package/public/{chunk-57P3RXT7.js → chunk-NUCXRR5D.js} +1 -1
  96. package/public/{chunk-DWKQU3C2.js → chunk-OTOQR5Z2.js} +1 -1
  97. package/public/{chunk-FJCVFWLW.js → chunk-PPA66JI2.js} +1 -1
  98. package/public/chunk-PZD3OMMY.js +1 -0
  99. package/public/{chunk-KX4SDDFZ.js → chunk-QJLKBB62.js} +1 -1
  100. package/public/chunk-QOSAHW73.js +50 -0
  101. package/public/{chunk-LRD25TWX.js → chunk-QU4I4QSX.js} +1 -1
  102. package/public/{chunk-7F2HVPC5.js → chunk-R2PMDKTD.js} +1 -1
  103. package/public/{chunk-CDA3O4BZ.js → chunk-RLWY3GD4.js} +1 -1
  104. package/public/{chunk-4FV7QIK7.js → chunk-RON3LUMX.js} +1 -1
  105. package/public/{chunk-MYSGML5C.js → chunk-SOA3BB36.js} +1 -1
  106. package/public/chunk-SXOLKD36.js +19 -0
  107. package/public/{chunk-CFEDPWK5.js → chunk-TGX55EFG.js} +1 -1
  108. package/public/{chunk-DT6ICOAZ.js → chunk-TJEQFEML.js} +1 -1
  109. package/public/{chunk-AOCOR5BO.js → chunk-UKEKNQEJ.js} +1 -1
  110. package/public/{chunk-YZT252N4.js → chunk-USXMCNIE.js} +1 -1
  111. package/public/{chunk-XYVHCMEV.js → chunk-VB4UAZWJ.js} +1 -1
  112. package/public/{chunk-3HKQMTY5.js → chunk-VFIOPF3O.js} +1 -1
  113. package/public/{chunk-OQ5J7Z5A.js → chunk-W26VKO62.js} +1 -1
  114. package/public/{chunk-N5GOQDTB.js → chunk-WMGV3KS6.js} +1 -1
  115. package/public/{chunk-WGFPD4J2.js → chunk-XS5JK2LY.js} +1 -1
  116. package/public/{chunk-QTJ3CQHI.js → chunk-Y2N6WV2O.js} +1 -1
  117. package/public/{chunk-F2E7FMEJ.js → chunk-Z6VQEXUS.js} +1 -1
  118. package/public/{chunk-BJ7NEXKS.js → chunk-ZC3JEQZ5.js} +1 -1
  119. package/public/{chunk-DRO3CNQN.js → chunk-ZF6W5Z5R.js} +1 -1
  120. package/public/index.html +2 -2
  121. package/public/{main-OQMKHLDX.js → main-QP5R7HI3.js} +1 -1
  122. package/public/media/matter-P563JGDL.svg +8 -0
  123. package/public/{styles-7EFV5QBG.css → styles-CSF457UW.css} +1 -1
  124. package/scripts/extract-plugin-alias.js +53 -2
  125. package/public/chunk-3DANXKYW.js +0 -1
  126. package/public/chunk-4E3QJA2Q.js +0 -1
  127. package/public/chunk-BJ4JCAZT.js +0 -1
  128. package/public/chunk-BQ2T2C4E.js +0 -1
  129. package/public/chunk-CLRVHL2M.js +0 -1
  130. package/public/chunk-F72JFLBX.js +0 -1
  131. package/public/chunk-J7EVJFYY.js +0 -16
  132. package/public/chunk-MY3FPHNS.js +0 -1
  133. package/public/chunk-RSNBQILW.js +0 -4
  134. package/public/chunk-UBFASDE7.js +0 -1
  135. package/public/chunk-VLG3LTSC.js +0 -50
  136. package/public/chunk-X7FSVUGO.js +0 -19
  137. package/public/chunk-XYUTAICH.js +0 -1
@@ -6,6 +6,7 @@
6
6
 
7
7
  const process = require('node:process')
8
8
  const EventEmitter = require('node:events').EventEmitter
9
+ const { readFileSync } = require('node:fs')
9
10
  const path = require('node:path')
10
11
 
11
12
  let pluginAlias
@@ -36,6 +37,26 @@ const HomebridgeApiMock = {
36
37
  serverVersion: '1.2.3',
37
38
  on: () => { /** mock */ },
38
39
  emit: () => { /** mock */ },
40
+ // Mock Matter API
41
+ isMatterAvailable() {
42
+ return true
43
+ },
44
+ isMatterEnabled() {
45
+ return true
46
+ },
47
+ matterDeviceTypes: new Proxy({}, {
48
+ get() {
49
+ return {} // Return empty object for any device type
50
+ },
51
+ }),
52
+ matterClusters: new Proxy({}, {
53
+ get() {
54
+ return {} // Return empty object for any cluster
55
+ },
56
+ }),
57
+ registerMatterAccessory: () => { /** mock */ },
58
+ unregisterMatterAccessory: () => { /** mock */ },
59
+ updateMatterAccessoryState: () => { /** mock */ },
39
60
  hap: {
40
61
  Characteristic: new class Characteristic extends EventEmitter {
41
62
  constructor() {
@@ -99,11 +120,41 @@ const HomebridgeApiMock = {
99
120
  },
100
121
  }
101
122
 
102
- function main() {
123
+ async function main() {
103
124
  try {
104
125
  let pluginInitializer
105
126
  const pluginPath = process.env.UIX_EXTRACT_PLUGIN_PATH
106
- const pluginModules = require(pluginPath)
127
+
128
+ // Read package.json to get the proper entry point
129
+ let actualEntryPoint = pluginPath
130
+ try {
131
+ const packageJsonPath = path.join(pluginPath, 'package.json')
132
+ const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'))
133
+
134
+ if (packageJson.main) {
135
+ actualEntryPoint = path.join(pluginPath, packageJson.main)
136
+ }
137
+ } catch (err) {
138
+ console.error('[extract-plugin-alias] Could not read package.json, using directory path')
139
+ }
140
+
141
+ let pluginModules
142
+
143
+ // Try to load as CommonJS first
144
+ try {
145
+ pluginModules = require(actualEntryPoint)
146
+ } catch (requireError) {
147
+ // If require fails, try dynamic import for ESM modules
148
+ try {
149
+ // For ESM, we need to use file:// URL on some platforms
150
+ const importPath = actualEntryPoint.startsWith('/') || actualEntryPoint.startsWith('file://')
151
+ ? actualEntryPoint
152
+ : path.resolve(actualEntryPoint)
153
+ pluginModules = await import(importPath)
154
+ } catch (importError) {
155
+ throw requireError // Throw the original error
156
+ }
157
+ }
107
158
 
108
159
  if (typeof pluginModules === 'function') {
109
160
  pluginInitializer = pluginModules
@@ -1 +0,0 @@
1
- import{h as i}from"./chunk-N5GOQDTB.js";import{eb as e,ja as t}from"./chunk-MMLBIEDP.js";var d=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"docker",loadChildren:()=>import("./chunk-QTJ3CQHI.js").then(o=>o.DockerModule)},{path:"linux",loadChildren:()=>import("./chunk-DWKQU3C2.js").then(o=>o.LinuxModule)},{path:"terminal",loadChildren:()=>import("./chunk-CDA3O4BZ.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 +0,0 @@
1
- import{a as n}from"./chunk-ICEM4QHU.js";import"./chunk-VLG3LTSC.js";import"./chunk-YZT252N4.js";import"./chunk-J7EVJFYY.js";import"./chunk-4FV7QIK7.js";import"./chunk-DT6ICOAZ.js";import"./chunk-MFEME63Q.js";import"./chunk-57P3RXT7.js";import"./chunk-F2E7FMEJ.js";import"./chunk-MYSGML5C.js";import"./chunk-IESBL4DA.js";import"./chunk-CUP4YO7L.js";import"./chunk-XYVHCMEV.js";import"./chunk-X2HK2VP5.js";import"./chunk-BJ7NEXKS.js";import"./chunk-5PCQVX7H.js";import"./chunk-5WH5JZQ5.js";import{h as r}from"./chunk-N5GOQDTB.js";import"./chunk-F72JFLBX.js";import"./chunk-BQ2T2C4E.js";import{eb as i,ja as t}from"./chunk-MMLBIEDP.js";var l=[{path:"",loadComponent:()=>import("./chunk-BJ4JCAZT.js").then(o=>o.PluginsComponent)}],u=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=i({type:o});static \u0275inj=t({imports:[r.forChild(l),r]})}return o})();var f=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=i({type:o});static \u0275inj=t({imports:[n,u]})}return o})();export{f as PluginsModule};
@@ -1 +0,0 @@
1
- import{a as Vi}from"./chunk-3HKQMTY5.js";import{a as Bi}from"./chunk-LTQGLD2K.js";import{N as Ii,P as X}from"./chunk-VLG3LTSC.js";import"./chunk-YZT252N4.js";import{f as j}from"./chunk-J7EVJFYY.js";import"./chunk-4FV7QIK7.js";import{a as Ti}from"./chunk-DT6ICOAZ.js";import"./chunk-MFEME63Q.js";import"./chunk-57P3RXT7.js";import"./chunk-F2E7FMEJ.js";import"./chunk-MYSGML5C.js";import"./chunk-IESBL4DA.js";import"./chunk-CUP4YO7L.js";import{a as ki}from"./chunk-XYVHCMEV.js";import{g as hi,h as bi,i as xi,j as vi,k as Pi,l as yi,m as A,n as R,t as L}from"./chunk-X2HK2VP5.js";import{B as fi,C as Ci,c as si,e as di,f as pi,g as ci,j as ui,m as mi,q as gi,r as _i}from"./chunk-BJ7NEXKS.js";import{a as K}from"./chunk-5PCQVX7H.js";import{b as J}from"./chunk-5WH5JZQ5.js";import{b as wi,e as Si}from"./chunk-N5GOQDTB.js";import{b as W}from"./chunk-F72JFLBX.js";import{k as O,l as B,n as G,q as Q}from"./chunk-BQ2T2C4E.js";import{$b as h,Ib as P,La as V,Lb as _,Ma as $,Na as ei,Nb as u,Pc as D,Qa as n,Rb as ti,Sb as ni,Sc as li,Tb as oi,Wc as ri,Zb as Y,_b as c,ac as b,db as k,h as I,ic as Z,lc as M,mc as T,na as y,nc as ai,pb as w,qb as m,rb as g,rc as r,sa as x,sc as s,ta as v,tb as z,tc as E,ub as q,vb as U,wb as C,x as H,xb as a,yb as l,zb as p}from"./chunk-MMLBIEDP.js";var Hi=e=>({pluginName:e}),Oi=(e,d)=>({setting:e,value:d});function ji(e,d){e&1&&(a(0,"li"),c(1),r(2,"translate"),l(),a(3,"li"),c(4),r(5,"translate"),l()),e&2&&(n(),h(s(2,2,"plugins.manage.confirm_disable_platform_1")),n(3),h(s(5,4,"plugins.manage.confirm_disable_platform_2")))}function Fi(e,d){e&1&&(a(0,"li"),c(1),r(2,"translate"),l(),a(3,"li"),c(4),r(5,"translate"),l()),e&2&&(n(),h(s(2,2,"plugins.manage.confirm_disable_accessory_1")),n(3),h(s(5,4,"plugins.manage.confirm_disable_accessory_2")))}function zi(e,d){if(e&1&&(a(0,"ul",15),p(1,"li",16),r(2,"translate"),a(3,"ul",17),m(4,ji,6,6)(5,Fi,6,6),l()()),e&2){let i=u(2);n(),C("innerHtml",E(2,2,"plugins.manage.confirm_disable_setting",T(5,Oi,i.keepOrphansName,i.keepOrphansValue)),V),n(3),g(i.keepOrphans?4:5)}}function qi(e,d){e&1&&(a(0,"ul",15)(1,"li"),c(2),r(3,"translate"),l(),a(4,"li"),c(5),r(6,"translate"),l()()),e&2&&(n(2),h(s(3,2,"plugins.manage.confirm_disable_accessory_1")),n(3),h(s(6,4,"plugins.manage.confirm_disable_accessory_2")))}function Ui(e,d){if(e&1&&m(0,zi,6,8,"ul",15)(1,qi,7,6,"ul",15),e&2){let i=u();g(i.isConfiguredDynamicPlatform?0:1)}}var Ei=(()=>{class e{$activeModal=y(A);$translate=y(O);pluginName;isConfigured=!1;isConfiguredDynamicPlatform=!1;keepOrphans=!1;keepOrphansName=`<code>${this.$translate.instant("settings.startup.keep_accessories")}</code>`;keepOrphansValue=`<code>${this.keepOrphans}</code>`;dismissModal(){this.$activeModal.dismiss("Dismiss")}closeModal(){this.$activeModal.close()}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=k({type:e,selectors:[["ng-component"]],inputs:{pluginName:"pluginName",isConfigured:"isConfigured",isConfiguredDynamicPlatform:"isConfiguredDynamicPlatform",keepOrphans:"keepOrphans"},decls:25,vars:21,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"mb-3","text-center"],[1,"fas","fa-circle-pause","primary-text",2,"font-size","75px"],["type","warning",1,"mb-0",3,"dismissible"],[1,"w-100","text-center","mb-0"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click"],[1,"mb-3"],[3,"innerHtml"],[1,"mb-1"]],template:function(o,t){o&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),c(3),l(),a(4,"button",3),r(5,"translate"),_("click",function(){return t.dismissModal()}),l()(),a(6,"div",4)(7,"div",5),p(8,"i",6),l(),m(9,Ui,2,1),a(10,"ngb-alert",7)(11,"p",8),c(12),r(13,"translate"),l()()(),a(14,"div",9)(15,"div",10)(16,"button",11),r(17,"translate"),_("click",function(){return t.dismissModal()}),c(18),r(19,"translate"),l()(),p(20,"div",12),a(21,"div",13)(22,"button",14),_("click",function(){return t.closeModal()}),c(23),r(24,"translate"),l()()()()),o&2&&(n(3),h(t.pluginName),n(),w("aria-label",s(5,8,"form.button_close")),n(5),g(t.isConfigured?9:-1),n(),C("dismissible",!1),n(2),h(E(13,10,"plugins.manage.confirm_disable",M(19,Hi,t.pluginName))),n(4),w("aria-label",s(17,13,"form.button_close")),n(2),b(" ",s(19,15,"form.button_close")," "),n(5),b(" ",s(24,17,"plugins.manage.disable")," "))},dependencies:[hi,B],encapsulation:2})}return e})();var Ri=e=>({author:e});function Li(e,d){if(e&1&&(a(0,"li",9),p(1,"i",15),a(2,"a",16),c(3),l()()),e&2){let i=d.$implicit,o=u();n(),C("ngClass",o.getIconClass(i.type)),n(),C("href",i.url,$),n(),h(i.url)}}var $i=(()=>{class e{$activeModal=y(A);plugin;fundingOptions;ngOnInit(){this.plugin.funding||this.$activeModal.close(),this.plugin.name==="homebridge-config-ui-x"&&(this.plugin.author="oznu"),Array.isArray(this.plugin.funding)?this.fundingOptions=this.plugin.funding.map(i=>{if(typeof i=="string")return{type:"other",url:i};if(typeof i=="object")return{type:i.type||"other",url:i.url}}):typeof this.plugin.funding=="string"?this.fundingOptions=[{type:"other",url:this.plugin.funding}]:typeof this.plugin.funding=="object"&&(this.fundingOptions=[{type:this.plugin.funding.type||"other",url:this.plugin.funding.url}])}getIconClass(i){switch(i.toLowerCase()){case"paypal":return"fab fa-paypal";case"github":return"fab fa-github";case"patreon":return"fab fa-patreon";case"kofi":case"ko-fi":return"fas fa-coffee";default:return"fas fa-link"}}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=k({type:e,selectors:[["ng-component"]],inputs:{plugin:"plugin"},decls:28,vars:21,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","pink-text","mb-3"],[1,"fas","fa-heart",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box"],[1,"list-group-item"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"],[1,"me-2","primary-text","fa-xl",3,"ngClass"],["target","_blank","rel","noopener noreferrer",1,"text-break-all",3,"href"]],template:function(o,t){o&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),c(3),r(4,"translate"),l(),a(5,"button",3),r(6,"translate"),_("click",function(){return t.dismissModal()}),l()(),a(7,"div",4)(8,"div",5),p(9,"i",6),l(),a(10,"ul",7)(11,"li"),c(12),r(13,"translate"),l(),a(14,"li"),c(15),r(16,"translate"),l()(),a(17,"ul",8),q(18,Li,4,3,"li",9,z),l()(),a(20,"div",10),p(21,"div",11),a(22,"div",12)(23,"button",13),r(24,"translate"),_("click",function(){return t.dismissModal()}),c(25),r(26,"translate"),l()(),p(27,"div",14),l()()),o&2&&(n(3),h(E(4,6,"plugins.donate.tile_donate_to",M(19,Ri,"@"+t.plugin.author))),n(2),w("aria-label",s(6,9,"form.button_close")),n(7),h(s(13,11,"plugins.donate.message_1")),n(3),h(s(16,13,"plugins.donate.message_2")),n(3),U(t.fundingOptions),n(5),w("aria-label",s(24,15,"form.button_close")),n(2),b(" ",s(26,17,"form.button_close")," "))},dependencies:[D,B],styles:[".text-break-all[_ngcontent-%COMP%]{word-break:break-all}"]})}return e})();var Gi=(e,d)=>({"orange-text":e,"grey-text":d}),ii=e=>({opacity:e}),Qi=(e,d)=>({"green-text":e,"grey-text":d}),Wi=(e,d)=>({"purple-text":e,"grey-text":d}),Ji=(e,d)=>({scopedLink:e,verifiedLink:d});function Ki(e,d){e&1&&(a(0,"h6",18),c(1),r(2,"translate"),l(),a(3,"p",19),c(4),r(5,"translate"),l(),a(6,"p",19),c(7),r(8,"translate"),l()),e&2&&(n(),h(s(2,3,"plugins.manage.scoped_subtitle")),n(3),h(s(5,5,"plugins.manage.scoped_message")),n(3),h(s(8,7,"plugins.manage.verified_message")))}function Xi(e,d){e&1&&(a(0,"h6",18),c(1),r(2,"translate"),l(),a(3,"p",19),c(4),r(5,"translate"),l()),e&2&&(n(),h(s(2,2,"plugins.manage.verified_subtitle")),n(3),h(s(5,4,"plugins.manage.verified_message")))}function Yi(e,d){e&1&&(a(0,"h6",18),c(1),r(2,"translate"),l(),a(3,"p",19),c(4),r(5,"translate"),l()),e&2&&(n(),h(s(2,2,"plugins.manage.unverified_subtitle")),n(3),h(s(5,4,"plugins.manage.unverified_message")))}function Zi(e,d){if(e&1){let i=P();a(0,"button",20),_("click",function(){x(i);let t=u();return v(t.dismissModal())}),c(1),r(2,"translate"),l()}e&2&&(n(),b(" ",s(2,1,"form.button_close")," "))}function ie(e,d){if(e&1){let i=P();a(0,"button",20),_("click",function(){x(i);let t=u();return v(t.dismissModal())}),c(1),r(2,"translate"),l()}e&2&&(n(),b(" ",s(2,1,"form.button_close")," "))}function ee(e,d){if(e&1&&(a(0,"a",17),c(1),r(2,"translate"),p(3,"i",21),l()),e&2){let i=u();C("href",i.plugin.links.homepage||i.plugin.links.npm,$),n(),b(" ",s(2,2,"plugins.button_homepage")," ")}}var Mi=(()=>{class e{$activeModal=y(A);plugin;defaultIcon="assets/hb-icon.png";linkScoped='<a href="https://github.com/homebridge/plugins/wiki/Scoped-Plugins" target="_blank"><i class="fas fa-external-link-alt primary-text"></i></a>';linkVerified='<a href="https://github.com/homebridge/plugins/wiki/Verified-Plugins" target="_blank"><i class="fas fa-external-link-alt primary-text"></i></a>';ngOnInit(){this.plugin.icon||(this.plugin.icon=this.defaultIcon)}handleIconError(){this.plugin.icon=this.defaultIcon}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=k({type:e,selectors:[["ng-component"]],inputs:{plugin:"plugin"},decls:32,vars:45,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"],["alt","Plugin Icon",1,"mb-3","plugin-icon-card",3,"error","src"],[1,"mb-1"],[1,"grey-text","mb-0","font-monospace"],[1,"grey-text","mb-1","font-monospace"],[1,"mb-3"],[1,"fas","fa-shield-alt","mb-3",2,"font-size","48px",3,"ngClass","ngStyle"],[1,"mb-0","grey-text",3,"innerHTML"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-center"],[1,"text-end"],["target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","text-decoration-none",3,"href"],[1,"mb-2"],[1,"mb-1","grey-text"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"fas","fa-external-link-alt"]],template:function(o,t){o&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),c(3),r(4,"translate"),l(),a(5,"button",3),r(6,"translate"),_("click",function(){return t.dismissModal()}),l()(),a(7,"div",4)(8,"img",5),_("error",function(){return t.handleIconError()}),l(),a(9,"h4",6),c(10),l(),a(11,"p",7),c(12),l(),a(13,"p",8),c(14),l(),a(15,"p",9),c(16),l(),p(17,"i",10)(18,"i",10)(19,"i",10),m(20,Ki,9,9),m(21,Xi,6,6),m(22,Yi,6,6),p(23,"p",11),r(24,"translate"),l(),a(25,"div",12)(26,"div",13),m(27,Zi,3,3,"button",14),l(),a(28,"div",15),m(29,ie,3,3,"button",14),l(),a(30,"div",16),m(31,ee,4,4,"a",17),l()()()),o&2&&(n(3),h(s(4,20,"plugins.manage.information")),n(2),w("aria-label",s(6,22,"form.button_close")),n(3),C("src",t.plugin.icon,$),n(2),h(t.plugin.displayName),n(2),h(t.plugin.name),n(2),b("@",t.plugin.author),n(2),h(t.plugin.description),n(),C("ngClass",T(27,Gi,!t.plugin.verifiedPlugin&&!t.plugin.verifiedPlusPlugin,t.plugin.verifiedPlugin||t.plugin.verifiedPlusPlugin))("ngStyle",M(30,ii,!t.plugin.verifiedPlugin&&!t.plugin.verifiedPlusPlugin?1:.25)),n(),C("ngClass",T(32,Qi,!t.plugin.isHbScoped&&(t.plugin.verifiedPlugin||t.plugin.verifiedPlusPlugin),t.plugin.isHbScoped||!t.plugin.verifiedPlugin&&!t.plugin.verifiedPlusPlugin))("ngStyle",M(35,ii,!t.plugin.isHbScoped&&(t.plugin.verifiedPlugin||t.plugin.verifiedPlusPlugin)?1:.25)),n(),C("ngClass",T(37,Wi,t.plugin.isHbScoped,!t.plugin.isHbScoped))("ngStyle",M(40,ii,t.plugin.isHbScoped?1:.25)),n(),g(t.plugin.isHbScoped?20:-1),n(),g(!t.plugin.isHbScoped&&(t.plugin.verifiedPlugin||t.plugin.verifiedPlusPlugin)?21:-1),n(),g(!t.plugin.verifiedPlugin&&!t.plugin.verifiedPlusPlugin?22:-1),n(),C("innerHTML",E(24,24,"plugins.manage.more_info",T(42,Ji,t.linkScoped,t.linkVerified)),V),n(4),g(t.plugin.links.homepage||t.plugin.links.npm?27:-1),n(2),g(!t.plugin.links.homepage&&!t.plugin.links.npm?29:-1),n(2),g(t.plugin.links.homepage||t.plugin.links.npm?31:-1))},dependencies:[D,li,B],styles:[".plugin-icon[_ngcontent-%COMP%]{height:75px;width:75px;border-radius:15px;border:1px solid #222222}"]})}return e})();var te=(e,d,i)=>({"purple-text":e,"green-text":d,"orange-text":i}),ne=(e,d)=>({"fa-bridge-circle-exclamation orange-text":e,"fa-bridge-circle-xmark red-text":d});function oe(e,d){if(e&1){let i=P();a(0,"a",21),r(1,"translate"),r(2,"translate"),_("click",function(){x(i);let t=u(2);return v(t.checkAndUpdatePlugin())}),p(3,"i",22),l()}e&2&&(C("openDelay",150)("ngbTooltip",s(1,3,"plugins.button_update")),w("aria-label",s(2,5,"plugins.button_update")))}function ae(e,d){if(e&1){let i=P();a(0,"a",21),r(1,"translate"),r(2,"translate"),_("click",function(){x(i);let t=u(2);return v(t.switchToScoped())}),p(3,"i",23),l()}e&2&&(C("openDelay",150)("ngbTooltip",s(1,3,"plugins.manage.scoped.switch")),w("aria-label",s(2,5,"plugins.manage.scoped.switch")))}function le(e,d){if(e&1){let i=P();a(0,"a",24),r(1,"translate"),r(2,"translate"),_("click",function(){x(i);let t=u(2);return v(t.openSettings())}),p(3,"i",25),l()}e&2&&(C("ngbTooltip",s(1,3,"plugins.button_set_up"))("openDelay",150),w("aria-label",s(2,5,"plugins.button_set_up")))}function re(e,d){if(e&1){let i=P();a(0,"a",24),r(1,"translate"),r(2,"translate"),_("click",function(){x(i);let t=u(2);return v(t.openBridgeSettings())}),p(3,"i",26),l()}e&2&&(C("ngbTooltip",s(1,3,"child_bridge.setup"))("openDelay",150),w("aria-label",s(2,5,"child_bridge.setup")))}function se(e,d){if(e&1){let i=P();a(0,"a",24),r(1,"translate"),r(2,"translate"),_("click",function(){x(i);let t=u(2);return v(t.openBridgeSettings())}),p(3,"i",27),l()}e&2&&(C("ngbTooltip",s(1,3,"child_bridge.bridge_connect"))("openDelay",150),w("aria-label",s(2,5,"child_bridge.bridge_connect")))}function de(e,d){if(e&1&&p(0,"i",20),e&2){let i=u(2);C("ngClass",T(1,ne,i.childBridgeStatus==="pending",i.childBridgeStatus==="down"))}}function pe(e,d){if(e&1&&(a(0,"div",9),m(1,oe,4,7,"a",17),m(2,ae,4,7,"a",17),m(3,le,4,7,"a",18),m(4,re,4,7,"a",18),m(5,se,4,7,"a",18),p(6,"i",19),m(7,de,1,4,"i",20),l()),e&2){let i=u();n(),g(i.plugin.installedVersion&&i.plugin.updateAvailable&&!i.childBridgeRestartInProgress?1:-1),n(),g(i.plugin.installedVersion&&(i.plugin.newHbScope==null?null:i.plugin.newHbScope.switch)===i.plugin.installedVersion&&!i.childBridgeRestartInProgress?2:-1),n(),g(i.plugin.installedVersion&&(!i.plugin.newHbScope||i.plugin.newHbScope.switch!==i.plugin.installedVersion)&&!i.plugin.updateAvailable&&!i.plugin.isConfigured&&!i.childBridgeRestartInProgress&&!i.plugin.disabled?3:-1),n(),g(i.plugin.installedVersion&&(!i.plugin.newHbScope||i.plugin.newHbScope.switch!==i.plugin.installedVersion)&&!i.plugin.updateAvailable&&i.plugin.isConfigured&&!i.plugin.hasChildBridges&&!i.plugin.disabled&&i.plugin.recommendChildBridge&&!i.childBridgeRestartInProgress?4:-1),n(),g(i.plugin.installedVersion&&(!i.plugin.newHbScope||i.plugin.newHbScope.switch!==i.plugin.installedVersion)&&!i.plugin.updateAvailable&&i.plugin.isConfigured&&i.plugin.hasChildBridges&&!i.childBridgeRestartInProgress&&i.plugin.hasChildBridgesUnpaired&&i.childBridgeStatus==="ok"&&!i.plugin.disabled?5:-1),n(),C("hidden",!i.childBridgeRestartInProgress),n(),g(i.plugin.installedVersion&&(!i.plugin.newHbScope||i.plugin.newHbScope.switch!==i.plugin.installedVersion)&&!i.plugin.updateAvailable&&i.plugin.isConfigured&&i.plugin.hasChildBridges&&!i.childBridgeRestartInProgress&&!i.plugin.hasChildBridgesUnpaired&&i.childBridgeStatus!=="ok"&&!i.plugin.disabled?7:-1)}}function ce(e,d){if(e&1){let i=P();a(0,"a",11),_("click",function(){x(i);let t=u();return v(t.openFundingModal(t.plugin))}),p(1,"i",28),a(2,"span",13),c(3),l()()}if(e&2){let i=u();n(3),b("@",i.plugin.author)}}function ue(e,d){if(e&1&&(a(0,"span",13),p(1,"i",29),c(2),l()),e&2){let i=u();n(2),b("@",i.plugin.author," ")}}function me(e,d){if(e&1&&(a(0,"span"),c(1),r(2,"date"),l()),e&2){let i=u(2);n(),b("(",E(2,1,i.plugin.lastUpdated,"yyyy-MM-dd"),")")}}function ge(e,d){if(e&1&&(a(0,"span"),p(1,"i",30),a(2,"span",13),c(3),m(4,me,3,4,"span"),l()()),e&2){let i=u();n(3),b("v",i.plugin.latestVersion," "),n(),g(i.plugin.lastUpdated?4:-1)}}function _e(e,d){if(e&1&&(p(0,"i",31),c(1)),e&2){let i=u();n(),b("v",i.plugin.installedVersion," ")}}function fe(e,d){if(e&1){let i=P();a(0,"a",21),r(1,"translate"),_("click",function(){x(i);let t=u(2);return v(t.doChildBridgeAction("restart"))}),p(2,"i",35),l()}if(e&2){let i=u(2);C("openDelay",150)("ngbTooltip",s(1,2,i.setChildBridges.length>1?"child_bridge.restart_plural":"child_bridge.restart"))}}function Ce(e,d){if(e&1){let i=P();a(0,"a",36),_("click",function(){x(i);let t=u(2);return v(t.enablePlugin(t.plugin))}),p(1,"i",37),r(2,"translate"),l()}e&2&&(n(),C("ngbTooltip",s(2,2,"plugins.status_disabled"))("openDelay",150))}function he(e,d){if(e&1){let i=P();a(0,"a",38),_("click",function(){x(i);let t=u(2);return v(t.installAlternateVersion())}),p(1,"i",39),l()}}function be(e,d){if(e&1){let i=P();a(0,"button",43),_("click",function(){x(i);let t=u(3);return v(t.viewPluginLog())}),p(1,"i",48),c(2),r(3,"translate"),l()}e&2&&(n(2),b(" ",s(3,1,"plugins.manage.plugin_logs")," "))}function xe(e,d){if(e&1){let i=P();a(0,"button",43),_("click",function(){x(i);let t=u(3);return v(t.installAlternateVersion())}),p(1,"i",49),c(2),r(3,"translate"),l()}e&2&&(n(2),b(" ",s(3,1,"plugins.manage.manage_version")," "))}function ve(e,d){if(e&1){let i=P();a(0,"button",43),_("click",function(){x(i);let t=u(3);return v(t.openJsonEditor())}),p(1,"i",50),c(2),r(3,"translate"),l()}e&2&&(n(2),b(" ",s(3,1,"plugins.manage.json_config")," "))}function Pe(e,d){if(e&1){let i=P();a(0,"button",43),_("click",function(){x(i);let t=u(3);return v(t.disablePlugin(t.plugin))}),p(1,"i",51),c(2),r(3,"translate"),l()}e&2&&(n(2),b(" ",s(3,1,"plugins.manage.disable")," "))}function ye(e,d){if(e&1){let i=P();a(0,"button",43),_("click",function(){x(i);let t=u(3);return v(t.enablePlugin(t.plugin))}),p(1,"i",52),c(2),r(3,"translate"),l()}e&2&&(n(2),b(" ",s(3,1,"plugins.manage.enable")," "))}function we(e,d){if(e&1){let i=P();a(0,"button",43),_("click",function(){x(i);let t=u(3);return v(t.uninstallPlugin())}),p(1,"i",53),c(2),r(3,"translate"),l()}e&2&&(n(2),b(" ",s(3,1,"plugins.button_uninstall")," "))}function Se(e,d){e&1&&p(0,"div",46)}function ke(e,d){if(e&1){let i=P();a(0,"button",43),_("click",function(){x(i);let t=u(4);return v(t.doChildBridgeAction("restart"))}),p(1,"i",56),c(2),r(3,"translate"),l()}if(e&2){let i=u(4);n(2),b(" ",s(3,1,i.setChildBridges.length>1?"child_bridge.restart_plural":"child_bridge.restart")," ")}}function Be(e,d){if(e&1){let i=P();a(0,"button",43),_("click",function(){x(i);let t=u(4);return v(t.doChildBridgeAction("stop"))}),p(1,"i",57),c(2),r(3,"translate"),l()}if(e&2){let i=u(4);n(2),b(" ",s(3,1,i.setChildBridges.length>1?"child_bridge.stop_plural":"child_bridge.stop")," ")}}function Te(e,d){if(e&1){let i=P();a(0,"button",43),_("click",function(){x(i);let t=u(4);return v(t.doChildBridgeAction("start"))}),p(1,"i",58),c(2),r(3,"translate"),l()}if(e&2){let i=u(4);n(2),b(" ",s(3,1,i.setChildBridges.length>1?"child_bridge.start_plural":"child_bridge.start")," ")}}function Ie(e,d){if(e&1){let i=P();a(0,"button",43),_("click",function(){x(i);let t=u(3);return v(t.openBridgeSettings())}),p(1,"i",54),c(2),r(3,"translate"),l(),m(4,ke,4,3,"button",45),m(5,Be,4,3,"button",45),m(6,Te,4,3,"button",45),a(7,"button",43),_("click",function(){x(i);let t=u(3);return v(t.resetChildBridges())}),p(8,"i",55),c(9),r(10,"translate"),l()}if(e&2){let i=u(3);n(2),b(" ",s(3,5,"child_bridge.bridge_settings")," "),n(2),g(i.childBridgeRestartInProgress?-1:4),n(),g(i.allChildBridgesStopped?-1:5),n(),g(i.allChildBridgesStopped?6:-1),n(3),b(" ",s(10,7,"child_bridge.reset_accessories")," ")}}function Ve(e,d){e&1&&p(0,"div",46)}function Ee(e,d){if(e&1){let i=P();a(0,"button",43),_("click",function(){x(i);let t=u(3);return v(t.openBridgeSettings())}),p(1,"i",59),c(2),r(3,"translate"),l()}e&2&&(n(2),b(" ",s(3,1,"child_bridge.setup")," "))}function $e(e,d){e&1&&p(0,"div",46)}function Me(e,d){if(e&1){let i=P();a(0,"button",43),_("click",function(){x(i);let t=u(3);return v(t.openBridgeSettings())}),p(1,"i",59),c(2),r(3,"translate"),l()}e&2&&(n(2),b(" ",s(3,1,"child_bridge.setup")," "))}function De(e,d){e&1&&p(0,"div",46)}function Ae(e,d){if(e&1&&(a(0,"a",47),p(1,"i",60),c(2),r(3,"translate"),l()),e&2){let i=u(3);C("href",i.plugin.links.bugs,$),n(2),b(" ",s(3,2,"support.links.issue")," ")}}function Ne(e,d){if(e&1){let i=P();a(0,"span",34)(1,"a",40),p(2,"i",41),l(),a(3,"div",42)(4,"button",43),_("click",function(){x(i);let t=u(2);return v(t.openSettings())}),p(5,"i",44),c(6),r(7,"translate"),l(),m(8,be,4,3,"button",45),m(9,xe,4,3,"button",45),m(10,ve,4,3,"button",45),m(11,Pe,4,3,"button",45),m(12,ye,4,3,"button",45),m(13,we,4,3,"button",45),m(14,Se,1,0,"div",46),m(15,Ie,11,9),m(16,Ve,1,0,"div",46),m(17,Ee,4,3,"button",45),m(18,$e,1,0,"div",46),m(19,Me,4,3,"button",45),m(20,De,1,0,"div",46),m(21,Ae,4,4,"a",47),l()()}if(e&2){let i=u(2);n(),w("aria-label","Plugin Actions Dropdown"),n(5),b(" ",s(7,16,"plugins.button_settings")," "),n(2),g(i.plugin.isConfigured&&!i.plugin.disabled?8:-1),n(),g(i.plugin.publicPackage?9:-1),n(),g(!i.isMobile&&i.plugin.name!=="homebridge-config-ui-x"?10:-1),n(),g(i.plugin.name!=="homebridge-config-ui-x"&&!i.plugin.disabled?11:-1),n(),g(i.plugin.name!=="homebridge-config-ui-x"&&i.plugin.disabled?12:-1),n(),g(i.plugin.name!=="homebridge-config-ui-x"?13:-1),n(),g(!i.plugin.disabled&&i.plugin.isConfigured&&i.plugin.hasChildBridges&&i.plugin.installedVersion&&i.plugin.name!=="homebridge-config-ui-x"?14:-1),n(),g(i.plugin.hasChildBridges&&!i.plugin.disabled?15:-1),n(),g(i.plugin.isConfigured&&!i.plugin.hasChildBridges&&!i.plugin.disabled&&!i.plugin.recommendChildBridge?16:-1),n(),g(i.plugin.isConfigured&&!i.plugin.hasChildBridges&&!i.plugin.disabled&&!i.plugin.recommendChildBridge?17:-1),n(),g(i.plugin.isConfigured&&!i.plugin.hasChildBridges&&!i.plugin.disabled&&i.plugin.recommendChildBridge&&i.plugin.updateAvailable?18:-1),n(),g(i.plugin.isConfigured&&!i.plugin.hasChildBridges&&!i.plugin.disabled&&i.plugin.recommendChildBridge&&i.plugin.updateAvailable?19:-1),n(),g(i.plugin.links!=null&&i.plugin.links.bugs?20:-1),n(),g(i.plugin.links!=null&&i.plugin.links.bugs?21:-1)}}function He(e,d){if(e&1&&(a(0,"div",9),m(1,fe,3,4,"a",17),m(2,Ce,3,4,"a",32),m(3,he,2,0,"a",33),m(4,Ne,22,18,"span",34),l()),e&2){let i=u();n(),g(!i.plugin.disabled&&i.plugin.hasChildBridges&&i.childBridgeStatus==="ok"?1:-1),n(),g(i.plugin.installedVersion&&i.plugin.disabled?2:-1),n(),g(i.plugin.publicPackage&&!i.plugin.installedVersion?3:-1),n(),g(i.plugin.installedVersion?4:-1)}}var Di=(()=>{class e{$api=y(Q);$auth=y(J);$md=y(Ti);$modal=y(R);$plugin=y(X);$settings=y(W);$toastr=y(G);$translate=y(O);$ws=y(K);io;plugin;hasChildBridges=!1;allChildBridgesStopped=!1;childBridgeStatus="pending";childBridgeRestartInProgress=!1;defaultIcon="assets/hb-icon.png";isMobile;setChildBridges=[];isAdmin=this.$auth.user.admin;set childBridges(i){this.hasChildBridges=i.length>0,this.allChildBridgesStopped=i.every(o=>o.manuallyStopped===!0),this.hasChildBridges&&(i.some(o=>o.status==="down")?this.childBridgeStatus="down":i.some(o=>o.status==="pending")?this.childBridgeStatus="pending":i.some(o=>o.status==="ok")&&(this.childBridgeStatus="ok")),this.setChildBridges=i}ngOnInit(){this.isMobile=this.$md.detect.mobile(),this.io=this.$ws.getExistingNamespace("child-bridges"),this.isMobile&&this.plugin.displayName.toLowerCase().startsWith("homebridge ")&&(this.plugin.displayName=this.plugin.displayName.replace(/^homebridge /i,"")),this.plugin.icon||(this.plugin.icon=this.defaultIcon)}openFundingModal(i){let o=this.$modal.open($i,{size:"lg",backdrop:"static"});o.componentInstance.plugin=i}pluginInfoModal(i){let o=this.$modal.open(Mi,{size:"lg",backdrop:"static"});o.componentInstance.plugin=i}disablePlugin(i){let o=this.$modal.open(Ei,{size:"lg",backdrop:"static"});o.componentInstance.pluginName=i.displayName,o.componentInstance.isConfigured=i.isConfigured,o.componentInstance.isConfiguredDynamicPlatform=i.isConfiguredDynamicPlatform,o.componentInstance.keepOrphans=this.$settings.keepOrphans,o.result.then(()=>I(this,null,function*(){try{yield H(this.$api.put(`/config-editor/plugin/${encodeURIComponent(i.name)}/disable`,{})),i.disabled=!0,this.hasChildBridges&&this.doChildBridgeAction("stop"),this.$modal.open(j,{size:"lg",backdrop:"static"})}catch(t){console.error(t),this.$toastr.error(this.$translate.instant("plugins.disable.error"),this.$translate.instant("toast.title_error"))}}))}enablePlugin(i){let o=this.$modal.open(ki,{size:"lg",backdrop:"static"});o.componentInstance.title=i.name,o.componentInstance.message=this.$translate.instant("plugins.manage.confirm_enable",{pluginName:i.displayName}),o.componentInstance.confirmButtonLabel=this.$translate.instant("plugins.manage.enable"),o.componentInstance.faIconClass="fa-circle-play primary-text",o.result.then(()=>I(this,null,function*(){try{yield H(this.$api.put(`/config-editor/plugin/${encodeURIComponent(i.name)}/enable`,{})),i.disabled=!1,this.hasChildBridges&&(yield this.doChildBridgeAction("start")),this.$modal.open(j,{size:"lg",backdrop:"static"})}catch(t){console.error(t),this.$toastr.error(this.$translate.instant("plugins.enable.error"),this.$translate.instant("toast.title_error"))}}))}viewPluginLog(){let i=this.$modal.open(Ii,{size:"xl",backdrop:"static"});i.componentInstance.plugin=this.plugin,i.componentInstance.childBridges=this.setChildBridges}doChildBridgeAction(i){return I(this,null,function*(){this.childBridgeRestartInProgress=!0;try{for(let o of this.setChildBridges)yield H(this.io.request(`${i}-child-bridge`,o.username))}catch(o){console.error(o),this.$toastr.error(this.$translate.instant("plugins.bridge.action_error",{action:i}),this.$translate.instant("toast.title_error")),this.childBridgeRestartInProgress=!1}finally{setTimeout(()=>{this.childBridgeRestartInProgress=!1},i==="restart"?12e3:i==="stop"?6e3:1e3)}})}handleIconError(){this.plugin.icon=this.defaultIcon}checkAndUpdatePlugin(){this.$plugin.checkAndUpdatePlugin(this.plugin,this.plugin.latestVersion)}openSettings(){this.$plugin.settings(this.plugin)}openBridgeSettings(){this.$plugin.bridgeSettings(this.plugin)}switchToScoped(){this.$plugin.switchToScoped(this.plugin)}installAlternateVersion(){this.$plugin.installAlternateVersion(this.plugin)}openJsonEditor(){this.$plugin.jsonEditor(this.plugin)}uninstallPlugin(){this.$plugin.uninstallPlugin(this.plugin,this.setChildBridges)}resetChildBridges(){this.$plugin.resetChildBridges(this.setChildBridges)}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=k({type:e,selectors:[["app-plugin-card"]],inputs:{plugin:"plugin",childBridges:"childBridges"},decls:24,vars:14,consts:[[1,"card","card-body","mb-3"],[1,"d-flex","flex-row","justify-content-between"],[1,"d-flex","flex-column","me-3","align-items-center","justify-content-between"],["alt","Plugin Icon",1,"plugin-icon-card","mb-3",3,"error","src"],[1,"d-flex","flex-column","justify-content-between",2,"min-width","calc(100% - 80px)"],[1,"d-flex","flex-row","align-items-end"],[1,"d-flex","flex-column","w-100"],[1,"d-flex","flex-row"],[1,"card-title","mb-2","text-truncate"],[1,"ms-auto"],[1,"card-text","mb-2","text-truncate"],["href","javascript:void(0)",1,"card-link",3,"click"],[1,"fas","fa-shield-alt","fa-lg","me-1",3,"ngClass"],[1,"grey-text"],[1,"card-text","mb-2"],["href","javascript:void(0)",1,"card-link"],[1,"card-text","mb-0","grey-text"],["href","javascript:void(0)","container","body","triggers","hover",1,"card-link",3,"openDelay","ngbTooltip"],["href","javascript:void(0)","container","body","triggers","hover",1,"card-link",3,"ngbTooltip","openDelay"],[1,"fas","fa-spinner","fa-pulse","fa-lg","grey-text","ms-3",3,"hidden"],[1,"fas","fa-lg","ms-3",3,"ngClass"],["href","javascript:void(0)","container","body","triggers","hover",1,"card-link",3,"click","openDelay","ngbTooltip"],[1,"far","fa-arrow-alt-circle-up","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"fas","fa-arrow-right-arrow-left","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],["href","javascript:void(0)","container","body","triggers","hover",1,"card-link",3,"click","ngbTooltip","openDelay"],[1,"fas","fa-sliders","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"icon-button","fas","fa-bridge","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"icon-button","fas","fa-qrcode","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"fas","fa-heart","fa-lg","me-1","pink-text"],[1,"fas","fa-heart","fa-lg","me-1",2,"opacity","0.5"],[1,"far","fa-circle-dot","fa-lg","me-1"],[1,"far","fa-circle-check","fa-lg","me-1"],["href","javascript:void(0)",1,"card-link","red-text"],["href","javascript:void(0)"],["ngbDropdown","","placement","left",1,"d-inline-block","ms-3","mt-auto"],[1,"fas","fa-lg","fa-power-off","ms-3"],["href","javascript:void(0)",1,"card-link","red-text",3,"click"],["container","body","triggers","hover",1,"far","fa-pause-circle","fa-lg",3,"ngbTooltip","openDelay"],["href","javascript:void(0)",3,"click"],[1,"far","fa-arrow-alt-circle-down","fa-lg"],["href","javascript:void(0)","ngbDropdownToggle","",1,"card-link","text-decoration-none","mt-auto",2,"outline","none"],[1,"fa-solid","fa-ellipsis-v","fa-lg"],["ngbDropdownMenu","","aria-labelledby","Plugin Actions Dropdown"],["ngbDropdownItem","",3,"click"],[1,"fas","fa-sliders"],["ngbDropdownItem",""],[1,"dropdown-divider"],["ngbDropdownItem","","rel","noopener noreferrer","target","_blank",3,"href"],[1,"fas","fa-wave-square"],[1,"fas","fa-code-compare"],[1,"fas","fa-code"],[1,"far","fa-circle-pause"],[1,"far","fa-circle-play"],[1,"fas","fa-trash"],[1,"fas","fa-bridge"],[1,"fas","fa-broom"],[1,"icon-button","fas","fa-power-off"],[1,"fas","fa-stop"],[1,"fas","fa-play"],[1,"icon-button","fas","fa-bridge"],[1,"icon-button","fa","fa-question-circle-o"]],template:function(o,t){o&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"img",3),_("error",function(){return t.handleIconError()}),l()(),a(4,"div",4)(5,"div",5)(6,"div",6)(7,"div",7)(8,"h5",8),c(9),l(),m(10,pe,8,7,"div",9),l(),a(11,"p",10)(12,"a",11),_("click",function(){return t.pluginInfoModal(t.plugin)}),p(13,"i",12),a(14,"span",13),c(15),l()()(),a(16,"p",14),m(17,ce,4,1,"a",15),m(18,ue,3,1,"span",13),l(),a(19,"div",7)(20,"p",16),m(21,ge,5,2,"span"),m(22,_e,2,1),l(),m(23,He,5,4,"div",9),l()()()()()()),o&2&&(n(3),C("src",t.plugin.icon,$),n(6),h(t.plugin.displayName),n(),g(t.isAdmin?10:-1),n(3),C("ngClass",ai(10,te,t.plugin.isHbScoped,!t.plugin.isHbScoped&&(t.plugin.verifiedPlugin||t.plugin.verifiedPlusPlugin),!t.plugin.isHbScoped&&!t.plugin.verifiedPlugin&&!t.plugin.verifiedPlusPlugin)),n(2),h(t.plugin.name),n(2),g((t.plugin.verifiedPlugin||t.plugin.verifiedPlusPlugin)&&t.plugin.funding?17:-1),n(),g((t.plugin.verifiedPlugin||t.plugin.verifiedPlusPlugin)&&t.plugin.funding?-1:18),n(3),g(t.plugin.publicPackage&&!t.plugin.installedVersion?21:-1),n(),g(t.plugin.installedVersion?22:-1),n(),g(t.isAdmin?23:-1))},dependencies:[L,D,yi,Pi,vi,xi,bi,ri,B],encapsulation:2})}return e})();var Ai=(()=>{class e{$activeModal=y(A);dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=k({type:e,selectors:[["ng-component"]],decls:28,vars:21,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fa","fa-question-circle-o","primary-text",2,"font-size","75px"],[1,"mb-0"],[3,"innerHTML"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"]],template:function(o,t){o&1&&(a(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),c(4),r(5,"translate"),l(),a(6,"button",3),r(7,"translate"),_("click",function(){return t.dismissModal()}),l()(),a(8,"div",4)(9,"div",5),p(10,"i",6),l(),a(11,"ul",7),p(12,"li",8),r(13,"translate"),p(14,"li",8),r(15,"translate"),p(16,"li",8),r(17,"translate"),p(18,"li",8),r(19,"translate"),l(),p(20,"app-support-banner"),l(),a(21,"div",9),p(22,"div",10),a(23,"div",11)(24,"button",12),_("click",function(){return t.dismissModal()}),c(25),r(26,"translate"),l()(),p(27,"div",13),l()()()),o&2&&(n(4),h(s(5,7,"support.title")),n(2),w("aria-label",s(7,9,"form.button_close")),n(6),C("innerHTML",s(13,11,"plugins.support.list_1"),V),n(2),C("innerHTML",s(15,13,"plugins.support.list_2"),V),n(2),C("innerHTML",s(17,15,"plugins.support.list_3"),V),n(2),C("innerHTML",s(19,17,"plugins.support.list_4"),V),n(7),b(" ",s(26,19,"form.button_close")," "))},dependencies:[Vi,B],encapsulation:2})}return e})();var Oe=["searchInput"],je=(e,d)=>({"fa-magnifying-glass":e,"fa-exclamation-circle":d});function Fe(e,d){e&1&&p(0,"app-spinner")}function ze(e,d){if(e&1){let i=P();a(0,"button",7),r(1,"translate"),r(2,"translate"),_("click",function(){x(i);let t=u();return v(t.showSearch())}),p(3,"i"),l(),a(4,"button",8),r(5,"translate"),r(6,"translate"),_("click",function(){x(i);let t=u();return v(t.showStats())}),p(7,"i"),l()}if(e&2){let i=u();C("openDelay",150)("ngbTooltip",s(1,13,"form.search"))("hidden",!i.installedPlugins.length&&!i.showSearchBar),w("aria-label",s(2,15,"form.search")),n(3),Y(Z("fas",i.showSearchBar?" primary-text":""," fa-search")),n(),C("openDelay",150)("ngbTooltip",s(5,17,"plugins.stats")),w("aria-label",s(6,19,"plugins.stats")),n(3),Y(Z("fas",i.tab==="stats"?" primary-text":""," fa-sliders"))}}function qe(e,d){if(e&1){let i=P();a(0,"a",15),_("click",function(){x(i);let t=u(3);return v(t.onClearSearch())}),p(1,"i",16),l()}}function Ue(e,d){if(e&1){let i=P();a(0,"div",9)(1,"div",11)(2,"form",12),_("ngSubmit",function(){x(i);let t=u(2);return v(t.onSubmit(t.form))}),p(3,"input",13,0),r(5,"translate"),m(6,qe,2,0,"a",14),l()()()}if(e&2){let i=u(2);n(2),C("formGroup",i.form),n(),C("placeholder",s(5,3,"plugins.placeholder_search_plugin")),n(3),g(i.showExitButton?6:-1)}}function Re(e,d){if(e&1&&(a(0,"div",17),p(1,"app-plugin-card",19),l()),e&2){let i=d.$implicit,o=u(3);n(),C("plugin",i)("childBridges",o.getPluginChildBridges(i))}}function Le(e,d){if(e&1&&(a(0,"div",18),p(1,"i",20),a(2,"p"),c(3),r(4,"translate"),l()()),e&2){let i=u(3);n(),C("ngClass",T(4,je,!i.showExitButton,i.showExitButton)),n(2),h(s(4,2,i.showExitButton?"plugins.placeholder_search_none":"plugins.placeholder_search_first"))}}function Ge(e,d){if(e&1&&(a(0,"div",10),q(1,Re,2,2,"div",17,z),m(3,Le,5,7,"div",18),l()),e&2){let i=u(2);n(),U(i.installedPlugins),n(2),g(i.installedPlugins.length===0&&!i.loading&&!i.mainError?3:-1)}}function Qe(e,d){if(e&1&&(m(0,Ue,7,5,"div",9),m(1,Ge,4,1,"div",10)),e&2){let i=u();g(i.showSearchBar?0:-1),n(),g(i.loading?-1:1)}}function We(e,d){e&1&&(a(0,"div",21)(1,"div",22)(2,"code"),c(3,"https://developers.homebridge.io/analytics "),a(4,"a",23),p(5,"i",24),l()()(),a(6,"div",25),c(7),r(8,"translate"),l()(),p(9,"iframe",26)),e&2&&(n(7),h(s(8,1,"plugins.stats_note")))}var pn=(()=>{class e{searchInput;$api=y(Q);$auth=y(J);$modal=y(R);$plugin=y(X);$router=y(Si);$settings=y(W);$toastr=y(G);$translate=y(O);$ws=y(K);isSearchMode=!1;io;navigationSubscription;mainError=!1;loading=!0;tab="main";installedPlugins=[];childBridges=[];showSearchBar=!1;showExitButton=!1;isAdmin=this.$auth.user.admin;form=new ci({query:new ui("")});ngOnInit(){return I(this,null,function*(){let i=this.$translate.instant("menu.label_plugins");this.$settings.setPageTitle(i),this.io=this.$ws.connectToNamespace("child-bridges"),this.io.connected.subscribe(()=>I(this,null,function*(){this.getChildBridgeMetadata(),this.io.socket.emit("monitor-child-bridge-status"),yield this.loadInstalledPlugins(),this.installedPlugins.length||this.showSearch();let{action:o,plugin:t}=this.$router.parseUrl(this.$router.url).queryParams;if(o){let f=this.installedPlugins.find(S=>S.name===t);switch(o){case"just-installed":{f&&(f.isConfigured?this.$modal.open(j,{size:"lg",backdrop:"static"}):this.$plugin.settings(f));break}case"open-manage-version":{f&&this.$plugin.installAlternateVersion(f);break}}this.$router.navigate([],{queryParams:{},replaceUrl:!0,queryParamsHandling:""})}})),this.io.socket.on("child-bridge-status-update",o=>{let t=this.childBridges.find(f=>f.username===o.username);t?Object.assign(t,o):this.childBridges.push(o)}),this.navigationSubscription=this.$router.events.subscribe(o=>{o instanceof wi&&this.loadInstalledPlugins()})})}search(){this.installedPlugins=[],this.loading=!0,this.showExitButton=!0,this.$api.get(`/plugins/search/${encodeURIComponent(this.form.value.query)}`).subscribe({next:i=>{let o=new Set,t=new Map(i.map(f=>[f.name,f]));this.installedPlugins=i.reduce((f,S)=>{if(S.name==="homebridge-config-ui-x"||o.has(S.name))return f;if(S.newHbScope){let N=S.newHbScope.to,Ni=t.has(N);(S.installedVersion||!Ni)&&(o.add(N),f.push(S))}else f.push(S);return f},[]),this.appendMetaInfo(),this.loading=!1},error:i=>{this.loading=!1,this.isSearchMode=!1,console.error(i),this.$toastr.error(i.error?.message||i.message,this.$translate.instant("toast.title_error")),this.loadInstalledPlugins()}})}onClearSearch(){this.loadInstalledPlugins()}onSubmit({value:i}){i.query.length?(this.isSearchMode=!0,this.search()):this.isSearchMode&&(this.isSearchMode=!1,this.loadInstalledPlugins())}showSearch(){this.showSearchBar?(this.showSearchBar=!1,this.isSearchMode&&(this.isSearchMode=!1,this.form.setValue({query:""}),this.loadInstalledPlugins())):(window.document.querySelector("body").classList.remove("bg-black"),this.tab="main",this.showSearchBar=!0,setTimeout(()=>this.searchInput.nativeElement.focus(),0))}showStats(){this.tab==="stats"?(window.document.querySelector("body").classList.remove("bg-black"),this.tab="main"):(window.document.querySelector("body").classList.add("bg-black"),this.tab="stats",this.showSearchBar=!1)}openSupport(){this.$modal.open(Ai,{size:"lg",backdrop:"static"})}ngOnDestroy(){window.document.querySelector("body").classList.remove("bg-black"),this.navigationSubscription&&this.navigationSubscription.unsubscribe(),this.io.end()}getPluginChildBridges(i){return this.childBridges.filter(o=>o.plugin===i.name)}loadInstalledPlugins(){return I(this,null,function*(){this.form.setValue({query:""}),this.showExitButton=!1,this.installedPlugins=[],this.loading=!0,this.mainError=!1;try{let i=yield H(this.$api.get("/plugins"));this.installedPlugins=i.filter(t=>t.name!=="homebridge-config-ui-x"),yield this.appendMetaInfo();let o=this.installedPlugins.sort((t,f)=>{let S=(t.updateAvailable?1e3:0)+(t.newHbScope?100:0)+(t.disabled?-10:0)+(t.isConfigured?-20:0)+(t.hasChildBridgesUnpaired?5:0)+(t.hasChildBridges&&this.$settings.env.recommendChildBridges?-1:0),N=(f.updateAvailable?1e3:0)+(f.newHbScope?100:0)+(f.disabled?-10:0)+(f.isConfigured?-20:0)+(f.hasChildBridgesUnpaired?5:0)+(f.hasChildBridges&&this.$settings.env.recommendChildBridges?-1:0);return S!==N?N-S:t.name.localeCompare(f.name)});return this.loading=!1,o}catch(i){console.error(i),this.loading=!1,this.mainError=!0,this.$toastr.error(this.$translate.instant("plugins.toast_failed_to_load_plugins"),this.$translate.instant("toast.title_error"))}})}appendMetaInfo(){return I(this,null,function*(){if(this.isAdmin){let i=new Set(this.$settings.env.plugins?.hidePairingAlerts||[]);yield Promise.all(this.installedPlugins.filter(o=>o.installedVersion).map(o=>I(this,null,function*(){try{let t=yield H(this.$api.get(`/config-editor/plugin/${encodeURIComponent(o.name)}`));o.isConfigured=t.length>0,o.isConfiguredDynamicPlatform=o.isConfigured&&Object.prototype.hasOwnProperty.call(t[0],"platform"),o.recommendChildBridge=o.isConfigured&&this.$settings.env.recommendChildBridges&&!["homebridge","homebridge-config-ui-x"].includes(o.name),o.hasChildBridges=o.isConfigured&&t.some(S=>S._bridge&&S._bridge.username);let f=this.getPluginChildBridges(o);o.hasChildBridgesUnpaired=f.some(S=>{let N=`${S.username}-hap`;return S.paired===!1&&!i.has(N.toUpperCase())}),this.$settings.env.plugins?.hideUpdatesFor?.includes(o.name)&&(o.updateAvailable=!1)}catch{o.isConfigured=!0,o.hasChildBridges=!0}})))}})}getChildBridgeMetadata(){this.io.request("get-homebridge-child-bridge-status").subscribe(i=>{this.childBridges=i})}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=k({type:e,selectors:[["ng-component"]],viewQuery:function(o,t){if(o&1&&ti(Oe,5),o&2){let f;ni(f=oi())&&(t.searchInput=f.first)}},decls:13,vars:9,consts:[["searchInput",""],[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end"],["type","button",1,"btn","btn-elegant","my-0","me-0",3,"click"],[1,"fa","fa-question-circle-o"],["type","button","container","body","placement","bottom","triggers","hover",1,"btn","btn-elegant","my-0","me-2",3,"click","openDelay","ngbTooltip","hidden"],["type","button","container","body","placement","bottom","triggers","hover",1,"btn","btn-elegant","my-0","me-2","d-none","d-md-inline-block",3,"click","openDelay","ngbTooltip"],[1,"row"],[1,"d-flex","flex-wrap","justify-content-between"],[1,"col-md-12"],["novalidate","",3,"ngSubmit","formGroup"],["type","text","formControlName","query",1,"search-bar",3,"placeholder"],["href","javascript:void(0)",1,"search-bar-clear"],["href","javascript:void(0)",1,"search-bar-clear",3,"click"],[1,"fas","fa-square-xmark"],[1,"hb-plugin-space-between"],[1,"alert","alert-info","mt-4","text-center","w-100"],[3,"plugin","childBridges"],[1,"fas","primary-text","my-3",2,"font-size","75px",3,"ngClass"],[1,"w-100","py-3","hb-stats-header","text-white","text-center"],[1,"mb-2"],["href","https://developers.homebridge.io/analytics","target","_blank"],[1,"fa","fa-external-link"],[1,"small","grey-text"],["src",ei`https://developers.homebridge.io/analytics/`,"sandbox","allow-scripts allow-same-origin allow-popups","referrerpolicy","no-referrer",1,"hb-stats"]],template:function(o,t){o&1&&(m(0,Fe,1,0,"app-spinner"),a(1,"div",1)(2,"div",2)(3,"h3",3),c(4),r(5,"translate"),l()(),a(6,"div",4),m(7,ze,8,21),a(8,"button",5),r(9,"translate"),_("click",function(){return t.openSupport()}),p(10,"i",6),l()()(),m(11,Qe,2,2)(12,We,10,3)),o&2&&(g(t.loading?0:-1),n(4),h(s(5,5,"menu.label_plugins")),n(3),g(t.isAdmin?7:-1),n(),w("aria-label",s(9,7,"support.title")),n(3),g(t.tab==="main"?11:t.tab==="stats"?12:-1))},dependencies:[Bi,fi,mi,si,di,pi,Ci,gi,_i,Di,D,L,B],styles:[".search-bar[_ngcontent-%COMP%]{outline:none;box-sizing:inherit!important;background-color:inherit;height:50px!important;width:100%;border-width:.5px;padding:10px;margin-bottom:15px}@media (hover: hover){.search-bar[_ngcontent-%COMP%]:hover{border:1px solid #000000}}.search-bar[_ngcontent-%COMP%]:focus{border:1px solid #000000;box-shadow:0 1px #000}.search-bar-clear[_ngcontent-%COMP%]{position:absolute;right:30px;font-size:25px;color:#d0d0d0;line-height:50px;cursor:pointer}.hb-plugin-space-between[_ngcontent-%COMP%]{box-sizing:border-box;width:calc(50% - 6.6666666667px)}@media only screen and (max-width: 991px){.hb-plugin-space-between[_ngcontent-%COMP%]{width:100%}}.hb-stats-header[_ngcontent-%COMP%]{background:#242424;border-top-left-radius:.5rem;border-top-right-radius:.5rem}.hb-stats-header[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{border:1px solid grey;border-radius:5px;padding:5px;font-size:.8rem;color:#d3d3d3}.hb-stats[_ngcontent-%COMP%]{height:calc(100% - 121px);width:100%;overflow:hidden;border-bottom-left-radius:.5rem;border-bottom-right-radius:.5rem}@media (max-width: 767px){.hb-stats[_ngcontent-%COMP%]{height:calc(100% - 60px)}}"]})}return e})();export{pn as PluginsComponent};
@@ -1 +0,0 @@
1
- import{Aa as M,C as at,D as lt,Da as Q,Db as _t,E as Pt,Eb as yt,Ec as Kt,Ib as Tt,Ka as Ht,Kb as $t,La as gt,Lb as V,Nb as f,O as Mt,Qa as a,R as P,Rc as Ct,Ta as mt,Xa as Bt,Xb as $,Zb as v,_ as ut,_a as L,_b as b,a as c,ac as x,b as F,ba as ct,db as vt,e as ne,eb as bt,ed as zt,gb as Vt,ia as d,ja as ht,jb as N,la as Y,ma as S,n as p,na as u,nd as qt,oa as Nt,ob as W,pb as H,s as k,sa as dt,ta as ft,u as D,wa as J,wb as h,xa as pt,xb as g,y as ot,yb as m,zb as B}from"./chunk-MMLBIEDP.js";var Xt=ne((Li,Ne)=>{Ne.exports={name:"homebridge-config-ui-x",displayName:"Homebridge UI",version:"5.9.0",description:"A web based management, configuration and control platform for Homebridge.",author:"oznu <dev@oz.nu>",license:"MIT",funding:[{type:"github",url:"https://github.com/sponsors/oznu"},{type:"paypal",url:"https://paypal.me/oznu"}],repository:{type:"git",url:"git+https://github.com/homebridge/homebridge-config-ui-x.git"},bugs:{url:"https://github.com/homebridge/homebridge-config-ui-x/issues"},keywords:["homebridge-plugin","ui","gui","web","homebridge","homebridge-config-ui-x","ui-x","config-ui-x","homebridge-x","homebridge server","homebridge ui","homebridge-ui","homebridge gui","homebridge-gui","web interface","config ui","management","config editor","linux","macOS","osx","windows","raspberry pi","accessory control","smart home","hb-service"],main:"./dist/index.js",bin:{"hb-service":"dist/bin/hb-service.js"},engines:{node:"^20.19.0 || ^22.12.0 || ^24.0.0",homebridge:"^1.8.0 || ^2.0.0-alpha.0"},scripts:{build:"npm run build:server && npm run build:ui","build:server":"rimraf dist && tsc -p tsconfig.build.json","build:ui":"npm run build --prefix ui",check:"npm run check:server && npm run check:ui","check:server":"npm install && npm outdated","check:ui":"npm install --prefix ui && npm outdated --prefix ui","lang-sync":"ts-node scripts/lang-sync.ts",lint:"eslint . --max-warnings=0","lint:fix":"npm run lint -- --fix",prepublishOnly:"npm i --package-lock-only && npm run lint && npm run build",start:"ts-node -r tsconfig-paths/register src/main.ts",test:"vitest run","test-coverage":"npm run test -- --coverage","upgrade-install":"./scripts/upgrade-install.sh",watch:'concurrently "npm run watch:ui" "npm run watch:server"',"watch:server":"nodemon","watch:ui":"npm run start --prefix ui"},dependencies:{"@fastify/helmet":"13.0.2","@fastify/multipart":"9.3.0","@fastify/static":"8.3.0","@homebridge/hap-client":"3.1.2","@homebridge/node-pty-prebuilt-multiarch":"0.13.1","@nestjs/axios":"4.0.1","@nestjs/common":"11.1.8","@nestjs/core":"11.1.8","@nestjs/jwt":"11.0.1","@nestjs/passport":"11.0.5","@nestjs/platform-fastify":"11.1.8","@nestjs/platform-socket.io":"11.1.8","@nestjs/swagger":"11.2.1","@nestjs/websockets":"11.1.8",axios:"1.13.1","bash-color":"0.0.4","bonjour-service":"1.3.0","class-transformer":"0.5.1","class-validator":"0.14.2",commander:"14.0.2",dayjs:"1.11.19",fastify:"5.6.1","fs-extra":"11.3.2",jsonwebtoken:"9.0.2",lodash:"4.17.21","node-cache":"5.1.2","node-schedule":"2.1.1",ora:"9.0.0",otplib:"12.0.1","p-limit":"7.2.0",passport:"0.7.0","passport-jwt":"4.0.1","reflect-metadata":"0.2.2",rxjs:"7.8.2",semver:"7.7.3",systeminformation:"5.27.11",tail:"2.2.6",tar:"7.5.2","tcp-port-used":"1.0.2",unzipper:"0.12.3"},devDependencies:{"@antfu/eslint-config":"^6.2.0","@nestjs/testing":"^11.1.8","@prettier/plugin-xml":"^3.4.2","@types/fs-extra":"^11.0.4","@types/lodash":"^4.17.20","@types/node":"^24.9.2","@types/node-schedule":"^2.1.8","@types/passport-jwt":"^4.0.1","@types/semver":"^7.7.1","@types/tail":"^2.2.3","@types/tcp-port-used":"^1.0.4","@types/unzipper":"^0.10.11","@vitest/coverage-v8":"^4.0.6",concurrently:"^9.2.1","eslint-plugin-format":"^1.0.2","form-data":"^4.0.4",nodemon:"^3.1.10",rimraf:"^6.1.0","ts-loader":"^9.5.4","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0",typescript:"^5.9.3","unplugin-swc":"^1.5.8",vitest:"^4.0.6"},overrides:{"@homebridge/hap-client":{axios:"1.13.1"}},maintainers:[{email:"bwp91@icloud.com",name:"bwp91"},{email:"dev@oz.nu",name:"oznu"},{email:"northern.man1@gmail.com",name:"northernman"},{email:"mail@anderl-bauer.de",name:"supereg"},{email:"khaos.tian@gmail.com",name:"khaost"},{email:"erik.baauw@xs4all.nl",name:"ebaauw"},{email:"donavan.becker@icloud.com",name:"donavanbecker"},{email:"dustin.greif@gmail.com",name:"dustin.greif"},{email:"nfarina@gmail.com",name:"nfarina"}],scarfSettings:{enabled:!1}}});var y=(function(e){return e[e.State=0]="State",e[e.Transition=1]="Transition",e[e.Sequence=2]="Sequence",e[e.Group=3]="Group",e[e.Animate=4]="Animate",e[e.Keyframes=5]="Keyframes",e[e.Style=6]="Style",e[e.Trigger=7]="Trigger",e[e.Reference=8]="Reference",e[e.AnimateChild=9]="AnimateChild",e[e.AnimateRef=10]="AnimateRef",e[e.Query=11]="Query",e[e.Stagger=12]="Stagger",e})(y||{}),se="*";function Lt(e,n){return{type:y.Trigger,name:e,definitions:n,options:{}}}function X(e,n=null){return{type:y.Animate,styles:n,timings:e}}function He(e,n=null){return{type:y.Sequence,steps:e,options:n}}function K(e){return{type:y.Style,styles:e,offset:null}}function z(e,n,t){return{type:y.State,name:e,styles:n,options:t}}function tt(e,n,t=null){return{type:y.Transition,expr:e,animation:n,options:t}}var wt=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(n=0,t=0){this.totalTime=n+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(n=>n()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(n){this._position=this.totalTime?n*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(n){let t=n=="start"?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}},Dt=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(n){this.players=n;let t=0,i=0,s=0,r=this.players.length;r==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(o=>{o.onDone(()=>{++t==r&&this._onFinish()}),o.onDestroy(()=>{++i==r&&this._onDestroy()}),o.onStart(()=>{++s==r&&this._onStart()})}),this.totalTime=this.players.reduce((o,l)=>Math.max(o,l.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this.players.forEach(n=>n.init())}onStart(n){this._onStartFns.push(n)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(n=>n()),this._onStartFns=[])}onDone(n){this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(n=>n.play())}pause(){this.players.forEach(n=>n.pause())}restart(){this.players.forEach(n=>n.restart())}finish(){this._onFinish(),this.players.forEach(n=>n.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(n=>n.destroy()),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this.players.forEach(n=>n.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(n){let t=n*this.totalTime;this.players.forEach(i=>{let s=i.totalTime?Math.min(1,t/i.totalTime):1;i.setPosition(s)})}getPosition(){let n=this.players.reduce((t,i)=>t===null||i.totalTime>t.totalTime?i:t,null);return n!=null?n.getPosition():0}beforeDestroy(){this.players.forEach(n=>{n.beforeDestroy&&n.beforeDestroy()})}triggerCallback(n){let t=n=="start"?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}},re="!";var G=class{},le=(()=>{class e{handle(t){return t.key}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})(),O=class{},ue=(()=>{class e extends O{compile(t,i){return t}compileTranslations(t,i){return t}static \u0275fac=(()=>{let t;return function(s){return(t||(t=Q(e)))(s||e)}})();static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})(),E=class{},ce=(()=>{class e extends E{getTranslation(t){return k({})}static \u0275fac=(()=>{let t;return function(s){return(t||(t=Q(e)))(s||e)}})();static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})();function et(e,n){if(e===n)return!0;if(e===null||n===null)return!1;if(e!==e&&n!==n)return!0;let t=typeof e,i=typeof n,s;if(t==i&&t=="object")if(Array.isArray(e)){if(!Array.isArray(n))return!1;if((s=e.length)==n.length){for(let r=0;r<s;r++)if(!et(e[r],n[r]))return!1;return!0}}else{if(Array.isArray(n))return!1;if(_(e)&&_(n)){let r=Object.create(null);for(let o in e){if(!et(e[o],n[o]))return!1;r[o]=!0}for(let o in n)if(!(o in r)&&typeof n[o]<"u")return!1;return!0}}return!1}function T(e){return typeof e<"u"&&e!==null}function Zt(e){return e!==void 0}function _(e){return Z(e)&&!I(e)&&e!==null}function Z(e){return typeof e=="object"&&e!==null}function I(e){return Array.isArray(e)}function it(e){return typeof e=="string"}function he(e){return typeof e=="function"}function nt(e){if(I(e))return e.map(n=>nt(n));if(_(e)){let n={};return Object.keys(e).forEach(t=>{n[t]=nt(e[t])}),n}else return e}function St(e,n){if(!Z(e))return nt(n);let t=nt(e);return Z(t)&&Z(n)&&Object.keys(n).forEach(i=>{_(n[i])?i in e?t[i]=St(e[i],n[i]):Object.assign(t,{[i]:n[i]}):Object.assign(t,{[i]:n[i]})}),t}function Ut(e,n){let t=n.split(".");n="";do{n+=t.shift();let i=!t.length;if(T(e)){if(_(e)&&Zt(e[n])&&(_(e[n])||I(e[n])||i)){e=e[n],n="";continue}if(I(e)){let s=parseInt(n,10);if(Zt(e[s])&&(_(e[s])||I(e[s])||i)){e=e[s],n="";continue}}}if(i){e=void 0;continue}n+="."}while(t.length);return e}function de(e,n,t){return St(e,fe(n,t))}function fe(e,n){return e.split(".").reduceRight((t,i)=>({[i]:t}),n)}var A=class{},pe=(()=>{class e extends A{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(t,i){if(it(t))return this.interpolateString(t,i);if(he(t))return this.interpolateFunction(t,i)}interpolateFunction(t,i){return t(i)}interpolateString(t,i){return i?t.replace(this.templateMatcher,(s,r)=>{let o=this.getInterpolationReplacement(i,r);return o!==void 0?o:s}):t}getInterpolationReplacement(t,i){return this.formatValue(Ut(t,i))}formatValue(t){if(it(t))return t;if(typeof t=="number"||typeof t=="boolean")return t.toString();if(t===null)return"null";if(I(t))return t.join(", ");if(Z(t))return typeof t.toString=="function"&&t.toString!==Object.prototype.toString?t.toString():JSON.stringify(t)}static \u0275fac=(()=>{let t;return function(s){return(t||(t=Q(e)))(s||e)}})();static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})(),xt=(()=>{class e{_onTranslationChange=new p;_onLangChange=new p;_onFallbackLangChange=new p;fallbackLang=null;currentLang;translations={};languages=[];getTranslations(t){return this.translations[t]}setTranslations(t,i,s){this.translations[t]=s&&this.hasTranslationFor(t)?St(this.translations[t],i):i,this.addLanguages([t]),this._onTranslationChange.next({lang:t,translations:this.getTranslations(t)})}getLanguages(){return this.languages}getCurrentLang(){return this.currentLang}getFallbackLang(){return this.fallbackLang}setFallbackLang(t,i=!0){this.fallbackLang=t,i&&this._onFallbackLangChange.next({lang:t,translations:this.translations[t]})}setCurrentLang(t,i=!0){this.currentLang=t,i&&this._onLangChange.next({lang:t,translations:this.translations[t]})}get onTranslationChange(){return this._onTranslationChange.asObservable()}get onLangChange(){return this._onLangChange.asObservable()}get onFallbackLangChange(){return this._onFallbackLangChange.asObservable()}addLanguages(t){this.languages=Array.from(new Set([...this.languages,...t]))}hasTranslationFor(t){return typeof this.translations[t]<"u"}deleteTranslations(t){delete this.translations[t]}getTranslation(t){let i=this.getValue(this.currentLang,t);return i===void 0&&this.fallbackLang!=null&&this.fallbackLang!==this.currentLang&&(i=this.getValue(this.fallbackLang,t)),i}getValue(t,i){return Ut(this.getTranslations(t),i)}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})(),It=new Y("TRANSLATE_CONFIG"),q=e=>D(e)?e:k(e);var Ft=(()=>{class e{loadingTranslations;pending=!1;_translationRequests={};lastUseLanguage=null;currentLoader=u(E);compiler=u(O);parser=u(A);missingTranslationHandler=u(G);store=u(xt);extend=!1;get onTranslationChange(){return this.store.onTranslationChange}get onLangChange(){return this.store.onLangChange}get onFallbackLangChange(){return this.store.onFallbackLangChange}get onDefaultLangChange(){return this.store.onFallbackLangChange}constructor(){let t=c({extend:!1,fallbackLang:null},u(It,{optional:!0}));t.lang&&this.use(t.lang),t.fallbackLang&&this.setFallbackLang(t.fallbackLang),t.extend&&(this.extend=!0)}setFallbackLang(t){this.getFallbackLang()||this.store.setFallbackLang(t,!1);let i=this.loadOrExtendLanguage(t);return D(i)?(i.pipe(P(1)).subscribe({next:()=>{this.store.setFallbackLang(t)},error:()=>{}}),i):(this.store.setFallbackLang(t),k(this.store.getTranslations(t)))}use(t){this.lastUseLanguage=t,this.getCurrentLang()||this.store.setCurrentLang(t,!1);let i=this.loadOrExtendLanguage(t);return D(i)?(i.pipe(P(1)).subscribe({next:()=>{this.changeLang(t)},error:()=>{}}),i):(this.changeLang(t),k(this.store.getTranslations(t)))}loadOrExtendLanguage(t){if(!this.store.hasTranslationFor(t)||this.extend)return this._translationRequests[t]=this._translationRequests[t]||this.loadAndCompileTranslations(t),this._translationRequests[t]}changeLang(t){t===this.lastUseLanguage&&this.store.setCurrentLang(t)}getCurrentLang(){return this.store.getCurrentLang()}loadAndCompileTranslations(t){this.pending=!0;let i=this.currentLoader.getTranslation(t).pipe(ut(1),P(1));return this.loadingTranslations=i.pipe(ot(s=>this.compiler.compileTranslations(s,t)),ut(1),P(1)),this.loadingTranslations.subscribe({next:s=>{this.store.setTranslations(t,s,this.extend),this.pending=!1},error:s=>{this.pending=!1}}),i}setTranslation(t,i,s=!1){let r=this.compiler.compileTranslations(i,t);this.store.setTranslations(t,r,s||this.extend)}getLangs(){return this.store.getLanguages()}addLangs(t){this.store.addLanguages(t)}getParsedResultForKey(t,i){let s=this.getTextToInterpolate(t);if(T(s))return this.runInterpolation(s,i);let r=this.missingTranslationHandler.handle(c({key:t,translateService:this},i!==void 0&&{interpolateParams:i}));return r!==void 0?r:t}getFallbackLang(){return this.store.getFallbackLang()}getTextToInterpolate(t){return this.store.getTranslation(t)}runInterpolation(t,i){if(T(t))return I(t)?this.runInterpolationOnArray(t,i):_(t)?this.runInterpolationOnDict(t,i):this.parser.interpolate(t,i)}runInterpolationOnArray(t,i){return t.map(s=>this.runInterpolation(s,i))}runInterpolationOnDict(t,i){let s={};for(let r in t){let o=this.runInterpolation(t[r],i);o!==void 0&&(s[r]=o)}return s}getParsedResult(t,i){return t instanceof Array?this.getParsedResultForArray(t,i):this.getParsedResultForKey(t,i)}getParsedResultForArray(t,i){let s={},r=!1;for(let l of t)s[l]=this.getParsedResultForKey(l,i),r=r||D(s[l]);if(!r)return s;let o=t.map(l=>q(s[l]));return Pt(o).pipe(ot(l=>{let C={};return l.forEach((U,w)=>{C[t[w]]=U}),C}))}get(t,i){if(!T(t)||!t.length)throw new Error('Parameter "key" is required and cannot be empty');return this.pending?this.loadingTranslations.pipe(Mt(()=>q(this.getParsedResult(t,i)))):q(this.getParsedResult(t,i))}getStreamOnTranslationChange(t,i){if(!T(t)||!t.length)throw new Error('Parameter "key" is required and cannot be empty');return at(lt(()=>this.get(t,i)),this.onTranslationChange.pipe(ct(()=>{let s=this.getParsedResult(t,i);return q(s)})))}stream(t,i){if(!T(t)||!t.length)throw new Error('Parameter "key" required');return at(lt(()=>this.get(t,i)),this.onLangChange.pipe(ct(()=>{let s=this.getParsedResult(t,i);return q(s)})))}instant(t,i){if(!T(t)||t.length===0)throw new Error('Parameter "key" is required and cannot be empty');let s=this.getParsedResult(t,i);return D(s)?Array.isArray(t)?t.reduce((r,o)=>(r[o]=o,r),{}):t:s}set(t,i,s=this.getCurrentLang()){this.store.setTranslations(s,de(this.store.getTranslations(s),t,it(i)?this.compiler.compile(i,s):this.compiler.compileTranslations(i,s)),!1)}reloadLang(t){return this.resetLang(t),this.loadAndCompileTranslations(t)}resetLang(t){delete this._translationRequests[t],this.store.deleteTranslations(t)}static getBrowserLang(){if(typeof window>"u"||!window.navigator)return;let t=this.getBrowserCultureLang();return t?t.split(/[-_]/)[0]:void 0}static getBrowserCultureLang(){if(!(typeof window>"u"||typeof window.navigator>"u"))return window.navigator.languages?window.navigator.languages[0]:window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage}getBrowserLang(){return e.getBrowserLang()}getBrowserCultureLang(){return e.getBrowserCultureLang()}get defaultLang(){return this.getFallbackLang()}get currentLang(){return this.store.getCurrentLang()}get langs(){return this.store.getLanguages()}setDefaultLang(t){return this.setFallbackLang(t)}getDefaultLang(){return this.getFallbackLang()}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})();var Ye=(()=>{class e{translate=u(Ft);_ref=u(Kt);value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onFallbackLangChange;updateValue(t,i,s){let r=o=>{this.value=o!==void 0?o:t,this.lastKey=t,this._ref.markForCheck()};if(s){let o=this.translate.getParsedResult(t,i);D(o)?o.subscribe(r):r(o)}this.translate.get(t,i).subscribe(r)}transform(t,...i){if(!t||!t.length)return t;if(et(t,this.lastKey)&&et(i,this.lastParams))return this.value;let s;if(T(i[0])&&i.length)if(it(i[0])&&i[0].length){let r=i[0].replace(/(')?([a-zA-Z0-9_]+)(')?(\s)?:/g,'"$2":').replace(/:(\s)?(')(.*?)(')/g,':"$3"');try{s=JSON.parse(r)}catch(o){throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${i[0]}`)}}else _(i[0])&&(s=i[0]);return this.lastKey=t,this.lastParams=i,this.updateValue(t,s),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(r=>{(this.lastKey&&r.lang===this.translate.getCurrentLang()||r.lang===this.translate.getFallbackLang())&&(this.lastKey=null,this.updateValue(t,s,r.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(r=>{this.lastKey&&(this.lastKey=null,this.updateValue(t,s,r.translations))})),this.onFallbackLangChange||(this.onFallbackLangChange=this.translate.onFallbackLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(t,s))})),this.value}_dispose(){typeof this.onTranslationChange<"u"&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),typeof this.onLangChange<"u"&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),typeof this.onFallbackLangChange<"u"&&(this.onFallbackLangChange.unsubscribe(),this.onFallbackLangChange=void 0)}ngOnDestroy(){this._dispose()}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=Vt({name:"translate",type:e,pure:!1});static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})();function ge(e){return{provide:E,useClass:e}}function me(e){return{provide:O,useClass:e}}function ve(e){return{provide:A,useClass:e}}function be(e){return{provide:G,useClass:e}}function Je(e={}){return _e(c({compiler:me(ue),parser:ve(pe),loader:ge(ce),missingTranslationHandler:be(le)},e),!0)}function _e(e={},n){let t=[];e.loader&&t.push(e.loader),e.compiler&&t.push(e.compiler),e.parser&&t.push(e.parser),e.missingTranslationHandler&&t.push(e.missingTranslationHandler),n&&t.push(xt),(e.useDefaultLang||e.defaultLanguage)&&(console.warn("The `useDefaultLang` and `defaultLanguage` options are deprecated. Please use `fallbackLang` instead."),e.useDefaultLang===!0&&e.defaultLanguage&&(e.fallbackLang=e.defaultLanguage));let i={fallbackLang:e.fallbackLang??null,lang:e.lang,extend:e.extend??!1};return t.push({provide:It,useValue:i}),t.push({provide:Ft,useClass:Ft,deps:[xt,E,O,A,G,It]}),t}var Yt=["toast-component",""];function ye(e,n){if(e&1){let t=Tt();g(0,"button",5),V("click",function(){dt(t);let s=f();return ft(s.remove())}),g(1,"span",6),b(2,"\xD7"),m()()}}function Te(e,n){if(e&1&&(_t(0),b(1),yt()),e&2){let t=f(2);a(),x("[",t.duplicatesCount+1,"]")}}function Ce(e,n){if(e&1&&(g(0,"div"),b(1),N(2,Te,2,1,"ng-container",4),m()),e&2){let t=f();v(t.options.titleClass),H("aria-label",t.title),a(),x(" ",t.title," "),a(),h("ngIf",t.duplicatesCount)}}function we(e,n){if(e&1&&B(0,"div",7),e&2){let t=f();v(t.options.messageClass),h("innerHTML",t.message,gt)}}function De(e,n){if(e&1&&(g(0,"div",8),b(1),m()),e&2){let t=f();v(t.options.messageClass),H("aria-label",t.message),a(),x(" ",t.message," ")}}function Le(e,n){if(e&1&&(g(0,"div"),B(1,"div",9),m()),e&2){let t=f();a(),$("width",t.width()+"%")}}function xe(e,n){if(e&1){let t=Tt();g(0,"button",5),V("click",function(){dt(t);let s=f();return ft(s.remove())}),g(1,"span",6),b(2,"\xD7"),m()()}}function Ie(e,n){if(e&1&&(_t(0),b(1),yt()),e&2){let t=f(2);a(),x("[",t.duplicatesCount+1,"]")}}function Fe(e,n){if(e&1&&(g(0,"div"),b(1),N(2,Ie,2,1,"ng-container",4),m()),e&2){let t=f();v(t.options.titleClass),H("aria-label",t.title),a(),x(" ",t.title," "),a(),h("ngIf",t.duplicatesCount)}}function Se(e,n){if(e&1&&B(0,"div",7),e&2){let t=f();v(t.options.messageClass),h("innerHTML",t.message,gt)}}function Oe(e,n){if(e&1&&(g(0,"div",8),b(1),m()),e&2){let t=f();v(t.options.messageClass),H("aria-label",t.message),a(),x(" ",t.message," ")}}function Ee(e,n){if(e&1&&(g(0,"div"),B(1,"div",9),m()),e&2){let t=f();a(),$("width",t.width()+"%")}}var Ot=class{_attachedHost;component;viewContainerRef;injector;constructor(n,t){this.component=n,this.injector=t}attach(n,t){return this._attachedHost=n,n.attach(this,t)}detach(){let n=this._attachedHost;if(n)return this._attachedHost=void 0,n.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(n){this._attachedHost=n}},Et=class{_attachedPortal;_disposeFn;attach(n,t){return this._attachedPortal=n,this.attachComponentPortal(n,t)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(n){this._disposeFn=n}},At=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new p;_activate=new p;_manualClose=new p;_resetTimeout=new p;_countDuplicate=new p;constructor(n){this._overlayRef=n}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(n,t){n&&this._resetTimeout.next(),t&&this._countDuplicate.next(++this.duplicatesCount)}},R=class{toastId;config;message;title;toastType;toastRef;_onTap=new p;_onAction=new p;constructor(n,t,i,s,r,o){this.toastId=n,this.config=t,this.message=i,this.title=s,this.toastType=r,this.toastRef=o,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(n){this._onAction.next(n)}onAction(){return this._onAction.asObservable()}},Jt={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},Qt=new Y("ToastConfig"),Rt=class extends Et{_hostDomElement;_componentFactoryResolver;_appRef;constructor(n,t,i){super(),this._hostDomElement=n,this._componentFactoryResolver=t,this._appRef=i}attachComponentPortal(n,t){let i=this._componentFactoryResolver.resolveComponentFactory(n.component),s;return s=i.create(n.injector),this._appRef.attachView(s.hostView),this.setDisposeFn(()=>{this._appRef.detachView(s.hostView),s.destroy()}),t?this._hostDomElement.insertBefore(this._getComponentRootNode(s),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(s)),s}_getComponentRootNode(n){return n.hostView.rootNodes[0]}},Ae=(()=>{class e{_document=u(pt);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t=this._document.createElement("div");t.classList.add("overlay-container"),t.setAttribute("aria-live","polite"),this._document.body.appendChild(t),this._containerElement=t}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),jt=class{_portalHost;constructor(n){this._portalHost=n}attach(n,t=!0){return this._portalHost.attach(n,t)}detach(){return this._portalHost.detach()}},Re=(()=>{class e{_overlayContainer=u(Ae);_componentFactoryResolver=u(Bt);_appRef=u(W);_document=u(pt);_paneElements=new Map;create(t,i){return this._createOverlayRef(this.getPaneElement(t,i))}getPaneElement(t="",i){return this._paneElements.get(i)||this._paneElements.set(i,{}),this._paneElements.get(i)[t]||(this._paneElements.get(i)[t]=this._createPaneElement(t,i)),this._paneElements.get(i)[t]}_createPaneElement(t,i){let s=this._document.createElement("div");return s.id="toast-container",s.classList.add(t),s.classList.add("toast-container"),i?i.getContainerElement().appendChild(s):this._overlayContainer.getContainerElement().appendChild(s),s}_createPortalHost(t){return new Rt(t,this._componentFactoryResolver,this._appRef)}_createOverlayRef(t){return new jt(this._createPortalHost(t))}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Wt=(()=>{class e{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(t,i,s,r,o){this.overlay=i,this._injector=s,this.sanitizer=r,this.ngZone=o,this.toastrConfig=c(c({},t.default),t.config),t.config.iconClasses&&(this.toastrConfig.iconClasses=c(c({},t.default.iconClasses),t.config.iconClasses))}show(t,i,s={},r=""){return this._preBuildNotification(r,t,i,this.applyConfig(s))}success(t,i,s={}){let r=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(r,t,i,this.applyConfig(s))}error(t,i,s={}){let r=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(r,t,i,this.applyConfig(s))}info(t,i,s={}){let r=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(r,t,i,this.applyConfig(s))}warning(t,i,s={}){let r=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(r,t,i,this.applyConfig(s))}clear(t){for(let i of this.toasts)if(t!==void 0){if(i.toastId===t){i.toastRef.manualClose();return}}else i.toastRef.manualClose()}remove(t){let i=this._findToast(t);if(!i||(i.activeToast.toastRef.close(),this.toasts.splice(i.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){let s=this.toasts[this.currentlyActive].toastRef;s.isInactive()||(this.currentlyActive=this.currentlyActive+1,s.activate())}return!0}findDuplicate(t="",i="",s,r){let{includeTitleDuplicates:o}=this.toastrConfig;for(let l of this.toasts){let C=o&&l.title===t;if((!o||C)&&l.message===i)return l.toastRef.onDuplicate(s,r),l}return null}applyConfig(t={}){return c(c({},this.toastrConfig),t)}_findToast(t){for(let i=0;i<this.toasts.length;i++)if(this.toasts[i].toastId===t)return{index:i,activeToast:this.toasts[i]};return null}_preBuildNotification(t,i,s,r){return r.onActivateTick?this.ngZone.run(()=>this._buildNotification(t,i,s,r)):this._buildNotification(t,i,s,r)}_buildNotification(t,i,s,r){if(!r.toastComponent)throw new Error("toastComponent required");let o=this.findDuplicate(s,i,this.toastrConfig.resetTimeoutOnDuplicate&&r.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&s||i)&&this.toastrConfig.preventDuplicates&&o!==null)return o;this.previousToastMessage=i;let l=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(l=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let C=this.overlay.create(r.positionClass,this.overlayContainer);this.index=this.index+1;let U=i;i&&r.enableHtml&&(U=this.sanitizer.sanitize(Ht.HTML,i));let w=new At(C),st=new R(this.index,r,U,s,t,w),te=[{provide:R,useValue:st}],ee=J.create({providers:te,parent:this._injector}),ie=new Ot(r.toastComponent,ee),kt=C.attach(ie,r.newestOnTop);w.componentInstance=kt.instance;let rt={toastId:this.index,title:s||"",message:i||"",toastRef:w,onShown:w.afterActivate(),onHidden:w.afterClosed(),onTap:st.onTap(),onAction:st.onAction(),portal:kt};return l||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{rt.toastRef.activate()})),this.toasts.push(rt),rt}static \u0275fac=function(i){return new(i||e)(S(Qt),S(Re),S(J),S(qt),S(mt))};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),je=(()=>{class e{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=M(-1);toastClasses="";state;get _state(){return this.state()}get displayStyle(){if(this.state().value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,i,s){this.toastrService=t,this.toastPackage=i,this.ngZone=s,this.message=i.message,this.title=i.title,this.options=i.config,this.originalTimeout=i.config.timeOut,this.toastClasses=`${i.toastType} ${i.config.toastClass}`,this.sub=i.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=i.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=i.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=i.toastRef.countDuplicate().subscribe(r=>{this.duplicatesCount=r}),this.state=M({value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.update(t=>F(c({},t),{value:"active"})),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),i=this.hideTime-t;this.width.set(i/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(s=>100-s),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.update(t=>F(c({},t),{value:"active"})),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state().value!=="removed"&&(clearTimeout(this.timeout),this.state.update(t=>F(c({},t),{value:"removed"})),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state().value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state().value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state().value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(t,i){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(t),i)):this.timeout=setTimeout(()=>t(),i)}outsideInterval(t,i){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(t),i)):this.intervalId=setInterval(()=>t(),i)}runInsideAngular(t){this.ngZone?this.ngZone.run(()=>t()):t()}static \u0275fac=function(i){return new(i||e)(L(Wt),L(R),L(mt))};static \u0275cmp=vt({type:e,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(i,s){i&1&&V("click",function(){return s.tapToast()})("mouseenter",function(){return s.stickAround()})("mouseleave",function(){return s.delayedHideToast()}),i&2&&($t("@flyInOut",s._state),v(s.toastClasses),$("display",s.displayStyle))},attrs:Yt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(i,s){i&1&&N(0,ye,3,0,"button",0)(1,Ce,3,5,"div",1)(2,we,1,3,"div",2)(3,De,2,4,"div",3)(4,Le,2,2,"div",4),i&2&&(h("ngIf",s.options.closeButton),a(),h("ngIf",s.title),a(),h("ngIf",s.message&&s.options.enableHtml),a(),h("ngIf",s.message&&!s.options.enableHtml),a(),h("ngIf",s.options.progressBar))},dependencies:[Ct],encapsulation:2,data:{animation:[Lt("flyInOut",[z("inactive",K({opacity:0})),z("active",K({opacity:1})),z("removed",K({opacity:0})),tt("inactive => active",X("{{ easeTime }}ms {{ easing }}")),tt("active => removed",X("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return e})(),ke=F(c({},Jt),{toastComponent:je}),Pe=(e={})=>Nt([{provide:Qt,useValue:{default:ke,config:e}}]),Ti=(()=>{class e{static forRoot(t={}){return{ngModule:e,providers:[Pe(t)]}}static \u0275fac=function(i){return new(i||e)};static \u0275mod=bt({type:e});static \u0275inj=ht({})}return e})();var Me=(()=>{class e{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=M(-1);toastClasses="";get displayStyle(){return this.state()==="inactive"?"none":null}state=M("inactive");timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,i,s){this.toastrService=t,this.toastPackage=i,this.appRef=s,this.message=i.message,this.title=i.title,this.options=i.config,this.originalTimeout=i.config.timeOut,this.toastClasses=`${i.toastType} ${i.config.toastClass}`,this.sub=i.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=i.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=i.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=i.toastRef.countDuplicate().subscribe(r=>{this.duplicatesCount=r})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.set("active"),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),i=this.hideTime-t;this.width.set(i/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(s=>100-s),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.set("active"),this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.state.set("removed"),this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){this.state()!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state()==="removed"||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(i){return new(i||e)(L(Wt),L(R),L(W))};static \u0275cmp=vt({type:e,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(i,s){i&1&&V("click",function(){return s.tapToast()})("mouseenter",function(){return s.stickAround()})("mouseleave",function(){return s.delayedHideToast()}),i&2&&(v(s.toastClasses),$("display",s.displayStyle))},attrs:Yt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(i,s){i&1&&N(0,xe,3,0,"button",0)(1,Fe,3,5,"div",1)(2,Se,1,3,"div",2)(3,Oe,2,4,"div",3)(4,Ee,2,2,"div",4),i&2&&(h("ngIf",s.options.closeButton),a(),h("ngIf",s.title),a(),h("ngIf",s.message&&s.options.enableHtml),a(),h("ngIf",s.message&&!s.options.enableHtml),a(),h("ngIf",s.options.progressBar))},dependencies:[Ct],encapsulation:2,changeDetection:0})}return e})(),Ci=F(c({},Jt),{toastComponent:Me});var j={serverTarget:Xt().version,production:!0,socket:"",api:{base:(()=>{let n=document.querySelector("base")?.getAttribute("href")||"/";return n.endsWith("/")?`${n}api`:`${n}/api`})(),socket:`${window.location.protocol==="http:"?"ws://":"wss://"}${window.location.host}`,origin:window.location.origin},jwt:{tokenKey:"access_token",allowedDomains:[document.location.host],disallowedRoutes:[(()=>{let n=document.querySelector("base")?.getAttribute("href")||"/",t=n.endsWith("/")?`${n}api`:`${n}/api`;return`${window.location.protocol}//${document.location.host}${t}/auth/login`})()]},apiHttpOptions:{},owm:{appid:"fec67b55f7f74deaa28df89ba6a60821"}};var Ei=(()=>{class e{$http=u(zt);get(t,i){return this.$http.get(`${j.api.base}${t}`,i)}post(t,i,s){return this.$http.post(`${j.api.base}${t}`,i,s)}put(t,i,s){return this.$http.put(`${j.api.base}${t}`,i,s)}patch(t,i,s){return this.$http.patch(`${j.api.base}${t}`,i,s)}delete(t,i){return this.$http.delete(`${j.api.base}${t}`,i)}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{y as a,se as b,Lt as c,X as d,He as e,K as f,tt as g,wt as h,Dt as i,re as j,Ft as k,Ye as l,Je as m,Wt as n,Ti as o,j as p,Ei as q};
@@ -1 +0,0 @@
1
- import{m as J}from"./chunk-X2HK2VP5.js";import{B as H,e as O,l as W,s as z,t as q,v as G}from"./chunk-BJ7NEXKS.js";import{e as Y}from"./chunk-N5GOQDTB.js";import{k as K,l as Q,n as X,q as Z}from"./chunk-BQ2T2C4E.js";import{$b as g,Ib as B,Lb as h,Nb as d,Pc as j,Qa as s,_b as c,a as T,ac as I,b as R,bc as V,db as D,fc as F,gc as U,h as M,hc as L,mc as N,na as w,nc as P,pb as A,qb as _,rb as u,rc as m,sa as v,sc as p,ta as f,tb as E,ub as k,vb as $,wb as C,x as S,xb as o,yb as a,zb as b}from"./chunk-MMLBIEDP.js";var te=(t,l)=>({"btn-danger":t,"btn-elegant":l}),ie=(t,l,e)=>({"fa-trash":t,"fa-undo":l,"fa-spinner fa-pulse":e});function ne(t,l){t&1&&(o(0,"div",12),b(1,"i",13),a(),o(2,"p",14),c(3),m(4,"translate"),a()),t&2&&(s(3),g(p(4,1,"reset.no_accessories")))}function se(t,l){if(t&1&&(o(0,"option",24),c(1),a()),t&2){let e=l.$implicit;C("value",e._id),s(),V("",e.name," (",e._username,")")}}function oe(t,l){if(t&1){let e=B();o(0,"li",20),c(1),m(2,"translate"),a(),o(3,"li",18)(4,"label",21),c(5),m(6,"translate"),a(),o(7,"div",22)(8,"select",23),L("ngModelChange",function(i){v(e);let r=d(2);return U(r.selectedBridge,i)||(r.selectedBridge=i),f(i)}),h("change",function(i){v(e);let r=d(2);return f(r.onBridgeChange(i.target.value))}),k(9,se,2,3,"option",24,E),a()()()}if(t&2){let e=d(2);s(),g(p(2,3,"form.label.changes_kept")),s(4),g(p(6,5,"reset.accessory_ind.bridge")),s(3),F("ngModel",e.selectedBridge),s(),$(e.pairings)}}function ae(t,l){if(t&1&&(o(0,"li",18)(1,"label",25),c(2),m(3,"translate"),a(),o(4,"div",26),c(5),a()()),t&2){let e=d(2);s(2),g(p(3,2,"reset.accessory_ind.bridge")),s(3),I(" ",e.getCurrentlySelectedBridge()," ")}}function re(t,l){if(t&1){let e=B();o(0,"li",19)(1,"span",27),b(2,"i",28),a(),o(3,"span",29),c(4),b(5,"br"),o(6,"small")(7,"span",30),c(8),a()()(),o(9,"button",31),m(10,"translate"),h("click",function(){let i=v(e).$implicit,r=d(2);return f(r.toggleList(i.UUID,i.$cacheFile))}),b(11,"i",32),a()()}if(t&2){let e=l.$implicit,n=d(2);s(4),I(" ",e.displayName," "),s(4),g(e.UUID),s(),C("disabled",n.clicked)("ngClass",N(8,te,!n.isInList(e.UUID,e.$cacheFile),n.isInList(e.UUID,e.$cacheFile))),A("aria-label",p(10,6,"form.button_delete")),s(2),C("ngClass",P(11,ie,!n.isInList(e.UUID,e.$cacheFile),n.isInList(e.UUID,e.$cacheFile)&&!n.clicked,n.isInList(e.UUID,e.$cacheFile)&&n.clicked))}}function le(t,l){if(t&1&&(o(0,"div",12),b(1,"i",15),a(),o(2,"ul",16)(3,"li"),c(4),m(5,"translate"),a(),o(6,"li"),c(7),m(8,"translate"),a(),o(9,"li"),c(10),m(11,"translate"),a()(),o(12,"ul",17),_(13,oe,11,7),_(14,ae,6,4,"li",18),k(15,re,12,15,"li",19,E),a()),t&2){let e=d();s(4),g(p(5,5,"reset.accessory_ind.list_1")),s(3),g(p(8,7,"reset.accessory_ind.list_2")),s(3),g(p(11,9,"reset.accessory_ind.list_3")),s(3),u(e.pairings.length>1?13:-1),s(),u(e.pairings.length===1?14:-1),s(),$(e.selectedBridgeAccessories)}}function ce(t,l){if(t&1){let e=B();o(0,"button",33),h("click",function(){v(e);let i=d();return f(i.dismissModal())}),c(1),m(2,"translate"),a()}if(t&2){let e=d();C("disabled",e.clicked),s(),I(" ",p(2,2,"form.button_close")," ")}}function de(t,l){if(t&1){let e=B();o(0,"button",34),h("click",function(){v(e);let i=d();return f(i.dismissModal())}),c(1),m(2,"translate"),a()}t&2&&(s(),I(" ",p(2,1,"form.button_close")," "))}function me(t,l){if(t&1&&c(0),t&2){let e=d(3);I(" (",e.toDelete.length,") ")}}function pe(t,l){if(t&1&&(c(0),m(1,"translate"),_(2,me,1,1)),t&2){let e=d(2);I(" ",p(1,2,"form.button_remove")," "),s(2),u(e.toDelete.length>0?2:-1)}}function _e(t,l){t&1&&b(0,"i",36)}function ue(t,l){if(t&1){let e=B();o(0,"button",35),h("click",function(){v(e);let i=d();return f(i.removeAccessories())}),_(1,pe,3,4),_(2,_e,1,0,"i",36),a()}if(t&2){let e=d();C("disabled",!e.toDelete.length||e.clicked),s(),u(e.clicked?-1:1),s(),u(e.clicked?2:-1)}}var Ee=(()=>{class t{$activeModal=w(J);$api=w(Z);$router=w(Y);$toastr=w(X);$translate=w(K);selectedBridge="";pairings=[];clicked=!1;selectedBridgeAccessories=[];accessoriesExist=!1;toDelete=[];ngOnInit(){this.loadCachedAccessories()}onBridgeChange(e){this.selectedBridge=e,this.selectedBridgeAccessories=this.pairings.find(n=>n._id===this.selectedBridge)?.accessories}getCurrentlySelectedBridge(){let e=this.pairings.find(n=>n._id===this.selectedBridge);return`${e.name} - ${e._username}`}toggleList(e,n){this.toDelete.some(i=>i.uuid===e&&i.cacheFile===n)?this.toDelete=this.toDelete.filter(i=>i.uuid!==e||i.cacheFile!==n):this.toDelete.push({cacheFile:n,uuid:e})}isInList(e,n){return this.toDelete.some(i=>i.uuid===e&&i.cacheFile===n)}removeAccessories(){return this.clicked=!0,this.$api.delete("/server/cached-accessories",{body:this.toDelete}).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("reset.accessory_ind.done"),this.$translate.instant("toast.title_success")),this.$activeModal.close(),this.$router.navigate(["/restart"],{queryParams:{restarting:!0}})},error:e=>{this.clicked=!1,console.error(e),this.$toastr.error(this.$translate.instant("reset.accessory_ind.fail"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadCachedAccessories(){return M(this,null,function*(){try{let[e,n]=yield Promise.all([S(this.$api.get("/server/cached-accessories")),S(this.$api.get("/server/pairings"))]),i=new Map(n.map(r=>[r._id,R(T({},r),{accessories:[]})]));e.sort((r,x)=>r.displayName.localeCompare(x.displayName)).forEach(r=>{let x=n.find(ee=>ee._main),y=r.$cacheFile?.split(".")?.[1]||x._id;(!this.selectedBridge||this.selectedBridge===y)&&(i.has(y)||i.set(y,{_id:y,_username:y.match(/.{1,2}/g).join(":"),name:this.$translate.instant("reset.accessory_ind.unknown"),accessories:[]}),i.get(y).accessories.push(r))}),this.pairings=Array.from(i.values()).filter(r=>r.accessories.length>0).sort((r,x)=>r._main&&!x._main?-1:!r._main&&x._main?1:r.name.localeCompare(x.name)),this.selectedBridge=this.selectedBridge||this.pairings[0]?._id,this.selectedBridge&&(this.accessoriesExist=!0,this.selectedBridgeAccessories=this.pairings[0].accessories)}catch(e){console.error(e),this.$toastr.error(this.$translate.instant("reset.error_message"),this.$translate.instant("toast.title_error")),this.$activeModal.close()}})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=D({type:t,selectors:[["ng-component"]],inputs:{selectedBridge:"selectedBridge"},decls:17,vars:12,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click","disabled"],[1,"modal-body"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"disabled"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"disabled"],[1,"text-center","mb-3"],[1,"fas","fa-circle-check","primary-text",2,"font-size","75px"],[1,"mb-0","text-center"],[1,"fas","fa-network-wired","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"list-group-item","text-center","grey-text","small"],["for","bridgeSelect",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["id","bridgeSelect",1,"custom-select",3,"ngModelChange","change","ngModel"],[3,"value"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50","grey-text","font-monospace"],[1,"me-3"],[1,"fas","fa-lg","fa-hap"],[1,"flex-grow-1"],[1,"font-monospace","grey-text"],[1,"btn","btn-danger","m-0","ms-3",3,"click","disabled","ngClass"],[1,"fas",3,"ngClass"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"],[1,"fas","fa-spinner","fa-pulse"]],template:function(n,i){n&1&&(o(0,"div",0)(1,"div",1)(2,"h5",2),c(3),m(4,"translate"),a(),o(5,"button",3),m(6,"translate"),h("click",function(){return i.dismissModal()}),a()(),o(7,"div",4),_(8,ne,5,3),_(9,le,17,11),a(),o(10,"div",5)(11,"div",6),_(12,ce,3,4,"button",7),a(),o(13,"div",8),_(14,de,3,3,"button",9),a(),o(15,"div",10),_(16,ue,3,3,"button",11),a()()()),n&2&&(s(3),g(p(4,8,"reset.accessory_ind.title")),s(2),C("disabled",i.clicked),A("aria-label",p(6,10,"form.button_close")),s(3),u(i.accessoriesExist?-1:8),s(),u(i.accessoriesExist?9:-1),s(3),u(i.accessoriesExist?12:-1),s(2),u(i.accessoriesExist?-1:14),s(2),u(i.accessoriesExist?16:-1))},dependencies:[j,H,q,G,z,O,W,Q],encapsulation:2})}return t})();export{Ee as a};
@@ -1 +0,0 @@
1
- import{k as tt,n as et,q as it}from"./chunk-BQ2T2C4E.js";import{W as R,e as ut,g as ct,h as P,ia as G,md as X,n as Q,na as Y,x as B}from"./chunk-MMLBIEDP.js";var st=ut((U,E)=>{(function(w,k){typeof U=="object"&&typeof E<"u"?E.exports=k():typeof define=="function"&&define.amd?define(k):(w=typeof globalThis<"u"?globalThis:w||self).dayjs=k()})(U,function(){"use strict";var w=1e3,k=6e4,s=36e5,h="millisecond",d="second",m="minute",M="hour",y="day",f="week",b="month",K="quarter",S="year",_="date",q="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 n=String(r);return!n||n.length>=i?r:""+Array(i+1-n.length).join(t)+r},at={s:F,z:function(r){var i=-r.utcOffset(),t=Math.abs(i),n=Math.floor(t/60),e=t%60;return(i<=0?"+":"-")+F(n,2,"0")+":"+F(e,2,"0")},m:function r(i,t){if(i.date()<t.date())return-r(t,i);var n=12*(t.year()-i.year())+(t.month()-i.month()),e=i.clone().add(n,b),o=t-e<0,a=i.clone().add(n+(o?-1:1),b);return+(-(n+(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:b,y:S,w:f,d:y,D:_,h:M,m,s:d,ms:h,Q:K}[r]||String(r||"").toLowerCase().replace(/s$/,"")},u:function(r){return r===void 0}},I="en",D={};D[I]=ot;var Z="$isDayjsObject",N=function(r){return r instanceof V||!(!r||!r[Z])},C=function r(i,t,n){var e;if(!i)return I;if(typeof i=="string"){var o=i.toLowerCase();D[o]&&(e=o),t&&(D[o]=t,e=o);var a=i.split("-");if(!e&&a.length>1)return r(a[0])}else{var c=i.name;D[c]=i,e=c}return!n&&e&&(I=e),e||!n&&I},g=function(r,i){if(N(r))return r.clone();var t=typeof i=="object"?i:{};return t.date=r,t.args=arguments,new V(t)},u=at;u.l=C,u.i=N,u.w=function(r,i){return g(r,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var V=(function(){function r(t){this.$L=C(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(n){var e=n.date,o=n.utc;if(e===null)return new Date(NaN);if(u.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var a=e.match(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()!==q},i.isSame=function(t,n){var e=g(t);return this.startOf(n)<=e&&e<=this.endOf(n)},i.isAfter=function(t,n){return g(t)<this.startOf(n)},i.isBefore=function(t,n){return this.endOf(n)<g(t)},i.$g=function(t,n,e){return u.u(t)?this[n]:this.set(e,t)},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this.$d.getTime()},i.startOf=function(t,n){var e=this,o=!!u.u(n)||n,a=u.p(t),c=function(x,v){var T=u.w(e.$u?Date.UTC(e.$y,v,x):new Date(e.$y,v,x),e);return o?T:T.endOf(y)},l=function(x,v){return u.w(e.toDate()[x].apply(e.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(v)),e)},$=this.$W,p=this.$M,L=this.$D,H="set"+(this.$u?"UTC":"");switch(a){case S:return o?c(1,0):c(31,11);case b:return o?c(1,p):c(0,p+1);case f:var O=this.$locale().weekStart||0,j=($<O?$+7:$)-O;return c(o?L-j:L+(6-j),p);case y: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,n){var e,o=u.p(t),a="set"+(this.$u?"UTC":""),c=(e={},e[y]=a+"Date",e[_]=a+"Date",e[b]=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===y?this.$D+(n-this.$W):n;if(o===b||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,n){return this.clone().$set(t,n)},i.get=function(t){return this[u.p(t)]()},i.add=function(t,n){var e,o=this;t=Number(t);var a=u.p(n),c=function(p){var L=g(o);return u.w(L.date(L.date()+Math.round(p*t)),o)};if(a===b)return this.set(b,this.$M+t);if(a===S)return this.set(S,this.$y+t);if(a===y)return c(1);if(a===f)return c(7);var l=(e={},e[m]=k,e[M]=s,e[d]=w,e)[a]||1,$=this.$d.getTime()+t*l;return u.w($,this)},i.subtract=function(t,n){return this.add(-1*t,n)},i.format=function(t){var n=this,e=this.$locale();if(!this.isValid())return e.invalidDate||q;var o=t||"YYYY-MM-DDTHH:mm:ssZ",a=u.z(this),c=this.$H,l=this.$m,$=this.$M,p=e.weekdays,L=e.months,H=e.meridiem,O=function(v,T,A,W){return v&&(v[T]||v(n,o))||A[T].slice(0,W)},j=function(v){return u.s(c%12||12,v,"0")},x=H||function(v,T,A){var W=v<12?"AM":"PM";return A?W.toLowerCase():W};return o.replace(rt,function(v,T){return T||(function(A){switch(A){case"YY":return String(n.$y).slice(-2);case"YYYY":return u.s(n.$y,4,"0");case"M":return $+1;case"MM":return u.s($+1,2,"0");case"MMM":return O(e.monthsShort,$,L,3);case"MMMM":return O(L,$);case"D":return n.$D;case"DD":return u.s(n.$D,2,"0");case"d":return String(n.$W);case"dd":return O(e.weekdaysMin,n.$W,p,2);case"ddd":return O(e.weekdaysShort,n.$W,p,3);case"dddd":return p[n.$W];case"H":return String(c);case"HH":return u.s(c,2,"0");case"h":return j(1);case"hh":return j(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(n.$s);case"ss":return u.s(n.$s,2,"0");case"SSS":return u.s(n.$ms,3,"0");case"Z":return a}return null})(v)||a.replace(":","")})},i.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},i.diff=function(t,n,e){var o,a=this,c=u.p(n),l=g(t),$=(l.utcOffset()-this.utcOffset())*k,p=this-l,L=function(){return u.m(a,l)};switch(c){case S:o=L()/12;break;case b:o=L();break;case K:o=L()/3;break;case f:o=(p-$)/6048e5;break;case y:o=(p-$)/864e5;break;case M:o=p/s;break;case m:o=p/k;break;case d:o=p/w;break;default:o=p}return e?o:u.a(o)},i.daysInMonth=function(){return this.endOf(b).$D},i.$locale=function(){return D[this.$L]},i.locale=function(t,n){if(!t)return this.$L;var e=this.clone(),o=C(t,n,!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=V.prototype;return g.prototype=z,[["$ms",h],["$s",d],["$m",m],["$H",M],["$W",y],["$M",b],["$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,V,g),r.$i=!0),g},g.locale=C,g.isDayjs=N,g.unix=function(r){return g(1e3*r)},g.en=D[I],g.Ls=D,g.p={},g})});var J=ct(st(),1);var vt=(()=>{class w{$api=Y(it);$title=Y(X);$toastr=Y(et);$translate=Y(tt);settingsLoadedSubject=new Q;defaultTheme="deep-purple";forbiddenKeys=["__proto__","constructor","prototype"];restartToastRef=null;env={};host;proxyHost;formAuth=!0;sessionTimeout=28800;sessionTimeoutInactivityBased=!1;uiVersion;theme;lightingMode;currentLightingMode;actualLightingMode;browserLightingMode;menuMode;keepOrphans;wallpaper;serverTimeOffset=0;rtl=!1;browserLang;onSettingsLoaded=this.settingsLoadedSubject.pipe(R());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 s=yield B(this.$api.get("/auth/settings"));this.formAuth=s.formAuth,this.sessionTimeout=s.sessionTimeout,this.sessionTimeoutInactivityBased=s.sessionTimeoutInactivityBased,this.env=s.env,this.host=s.host,this.proxyHost=s.proxyHost,this.lightingMode=s.lightingMode,this.wallpaper=s.wallpaper,this.setLightingMode(this.lightingMode,"user"),this.setTheme(s.theme),this.setMenuMode(s.menuMode),this.setKeepOrphans(s.keepOrphans),this.setTitle(this.env.homebridgeInstanceName),this.checkServerTime(s.serverTimestamp),this.setUiVersion(s.env.packageVersion),this.setLang(this.env.lang),this.settingsLoaded=!0,this.settingsLoadedSubject.next(void 0),this.browserLang=this.$translate.getBrowserCultureLang()})}setBrowserLightingMode(s){this.browserLightingMode=s,this.lightingMode==="auto"&&this.setLightingMode(s,"browser")}setLightingMode(s,h){h==="user"&&(this.lightingMode=s),this.currentLightingMode=s,this.actualLightingMode=this.currentLightingMode==="auto"?this.browserLightingMode:this.currentLightingMode,this.theme&&this.setTheme(this.theme)}setTheme(s){(!s||!this.themeList.includes(s))&&(s=this.defaultTheme,B(this.$api.put("/config-editor/ui",{key:"theme",value:s})).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=s,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 y=m.contentDocument;if(y){let f=y.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:s},window.location.origin)}}catch(y){console.warn(`Iframe ${M}: Access denied (cross-origin?)`,{error:y,src:m.src})}})}setMenuMode(s){this.menuMode=s}setKeepOrphans(s){this.keepOrphans=s}setLang(s){s?this.$translate.use(s):s="auto",this.env.lang=s}setItem(s,h){this[s]=h}setEnvItem(s,h){if(s.includes(".")){let d=s.split("."),m=this.env;for(let M=0;M<d.length-1;M+=1){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[s]=h}checkServerTime(s){let d=(0,J.default)(s).diff((0,J.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(s){this.uiVersion||(this.uiVersion=s)}setTitle(s){this.$title.setTitle(s||"Homebridge")}setPageTitle(s){let h=this.env.homebridgeInstanceName||"Homebridge";s?this.$title.setTitle(`${h} \u2014 ${s}`):this.$title.setTitle(h)}isFeatureEnabled(s){return this.env.featureFlags?.[s]??!1}static \u0275fac=function(h){return new(h||w)};static \u0275prov=G({token:w,factory:w.\u0275fac,providedIn:"root"})}return w})();export{st as a,vt as b};
@@ -1,16 +0,0 @@
1
- import{m as Bt}from"./chunk-X2HK2VP5.js";import{e as yr}from"./chunk-N5GOQDTB.js";import{k as hr,l as ht,n as br,q as vr}from"./chunk-BQ2T2C4E.js";import{$b as Me,Ab as G,Bb as X,Cb as be,Mb as ye,Qa as H,_b as ue,a as Ar,ac as Re,b as Cr,db as gt,e as Aa,h as Fr,na as he,pb as Ve,rc as Q,sc as k,tb as xr,ub as gr,vb as Br,x as Er}from"./chunk-MMLBIEDP.js";var rD=Aa((ir,fr)=>{(function(e,t){typeof ir=="object"&&typeof fr<"u"?fr.exports=t():typeof define=="function"&&define.amd?define(t):e.JSON5=t()})(ir,function(){"use strict";function e(u,a){return a={exports:{}},u(a,a.exports),a.exports}var t=e(function(u){var a=u.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=a)}),r=e(function(u){var a=u.exports={version:"2.6.5"};typeof __e=="number"&&(__e=a)}),o=r.version,f=function(u){return typeof u=="object"?u!==null:typeof u=="function"},i=function(u){if(!f(u))throw TypeError(u+" is not an object!");return u},D=function(u){try{return!!u()}catch{return!0}},l=!D(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7}),m=t.document,g=f(m)&&f(m.createElement),B=function(u){return g?m.createElement(u):{}},h=!l&&!D(function(){return Object.defineProperty(B("div"),"a",{get:function(){return 7}}).a!=7}),y=function(u,a){if(!f(u))return u;var p,s;if(a&&typeof(p=u.toString)=="function"&&!f(s=p.call(u))||typeof(p=u.valueOf)=="function"&&!f(s=p.call(u))||!a&&typeof(p=u.toString)=="function"&&!f(s=p.call(u)))return s;throw TypeError("Can't convert object to primitive value")},M=Object.defineProperty,I=l?Object.defineProperty:function(a,p,s){if(i(a),p=y(p,!0),i(s),h)try{return M(a,p,s)}catch{}if("get"in s||"set"in s)throw TypeError("Accessors not supported!");return"value"in s&&(a[p]=s.value),a},$={f:I},j=function(u,a){return{enumerable:!(u&1),configurable:!(u&2),writable:!(u&4),value:a}},T=l?function(u,a,p){return $.f(u,a,j(1,p))}:function(u,a,p){return u[a]=p,u},pe={}.hasOwnProperty,nt=function(u,a){return pe.call(u,a)},Ue=0,He=Math.random(),Uo=function(u){return"Symbol(".concat(u===void 0?"":u,")_",(++Ue+He).toString(36))},Ho=!1,$o=e(function(u){var a="__core-js_shared__",p=t[a]||(t[a]={});(u.exports=function(s,d){return p[s]||(p[s]=d!==void 0?d:{})})("versions",[]).push({version:r.version,mode:Ho?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})}),Yt=$o("native-function-to-string",Function.toString),qo=e(function(u){var a=Uo("src"),p="toString",s=(""+Yt).split(p);r.inspectSource=function(d){return Yt.call(d)},(u.exports=function(d,F,x,J){var N=typeof x=="function";N&&(nt(x,"name")||T(x,"name",F)),d[F]!==x&&(N&&(nt(x,a)||T(x,a,d[F]?""+d[F]:s.join(String(F)))),d===t?d[F]=x:J?d[F]?d[F]=x:T(d,F,x):(delete d[F],T(d,F,x)))})(Function.prototype,p,function(){return typeof this=="function"&&this[a]||Yt.call(this)})}),Vo=function(u){if(typeof u!="function")throw TypeError(u+" is not a function!");return u},sr=function(u,a,p){if(Vo(u),a===void 0)return u;switch(p){case 1:return function(s){return u.call(a,s)};case 2:return function(s,d){return u.call(a,s,d)};case 3:return function(s,d,F){return u.call(a,s,d,F)}}return function(){return u.apply(a,arguments)}},Xt="prototype",z=function(u,a,p){var s=u&z.F,d=u&z.G,F=u&z.S,x=u&z.P,J=u&z.B,N=d?t:F?t[a]||(t[a]={}):(t[a]||{})[Xt],je=d?r:r[a]||(r[a]={}),$e=je[Xt]||(je[Xt]={}),ae,ie,Y,qe;d&&(p=a);for(ae in p)ie=!s&&N&&N[ae]!==void 0,Y=(ie?N:p)[ae],qe=J&&ie?sr(Y,t):x&&typeof Y=="function"?sr(Function.call,Y):Y,N&&qo(N,ae,Y,u&z.U),je[ae]!=Y&&T(je,ae,qe),x&&$e[ae]!=Y&&($e[ae]=Y)};t.core=r,z.F=1,z.G=2,z.S=4,z.P=8,z.B=16,z.W=32,z.U=64,z.R=128;var it=z,Wo=Math.ceil,zo=Math.floor,Dr=function(u){return isNaN(u=+u)?0:(u>0?zo:Wo)(u)},Ko=function(u){if(u==null)throw TypeError("Can't call method on "+u);return u},Jo=function(u){return function(a,p){var s=String(Ko(a)),d=Dr(p),F=s.length,x,J;return d<0||d>=F?u?"":void 0:(x=s.charCodeAt(d),x<55296||x>56319||d+1===F||(J=s.charCodeAt(d+1))<56320||J>57343?u?s.charAt(d):x:u?s.slice(d,d+2):(x-55296<<10)+(J-56320)+65536)}},Yo=Jo(!1);it(it.P,"String",{codePointAt:function(a){return Yo(this,a)}});var uD=r.String.codePointAt,Xo=Math.max,Zo=Math.min,Qo=function(u,a){return u=Dr(u),u<0?Xo(u+a,0):Zo(u,a)},pr=String.fromCharCode,lr=String.fromCodePoint;it(it.S+it.F*(!!lr&&lr.length!=1),"String",{fromCodePoint:function(a){for(var p=arguments,s=[],d=arguments.length,F=0,x;d>F;){if(x=+p[F++],Qo(x,1114111)!==x)throw RangeError(x+" is not a valid code point");s.push(x<65536?pr(x):pr(((x-=65536)>>10)+55296,x%1024+56320))}return s.join("")}});var oD=r.String.fromCodePoint,ko=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ea=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ta=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Zt={Space_Separator:ko,ID_Start:ea,ID_Continue:ta},O={isSpaceSeparator:function(a){return typeof a=="string"&&Zt.Space_Separator.test(a)},isIdStartChar:function(a){return typeof a=="string"&&(a>="a"&&a<="z"||a>="A"&&a<="Z"||a==="$"||a==="_"||Zt.ID_Start.test(a))},isIdContinueChar:function(a){return typeof a=="string"&&(a>="a"&&a<="z"||a>="A"&&a<="Z"||a>="0"&&a<="9"||a==="$"||a==="_"||a==="\u200C"||a==="\u200D"||Zt.ID_Continue.test(a))},isDigit:function(a){return typeof a=="string"&&/[0-9]/.test(a)},isHexDigit:function(a){return typeof a=="string"&&/[0-9A-Fa-f]/.test(a)}},Qt,K,le,At,ge,oe,R,kt,ft,ra=function(a,p){Qt=String(a),K="start",le=[],At=0,ge=1,oe=0,R=void 0,kt=void 0,ft=void 0;do R=ua(),na[K]();while(R.type!=="eof");return typeof p=="function"?er({"":ft},"",p):ft};function er(u,a,p){var s=u[a];if(s!=null&&typeof s=="object")if(Array.isArray(s))for(var d=0;d<s.length;d++){var F=String(d),x=er(s,F,p);x===void 0?delete s[F]:Object.defineProperty(s,F,{value:x,writable:!0,enumerable:!0,configurable:!0})}else for(var J in s){var N=er(s,J,p);N===void 0?delete s[J]:Object.defineProperty(s,J,{value:N,writable:!0,enumerable:!0,configurable:!0})}return p.call(u,a,s)}var C,c,st,me,E;function ua(){for(C="default",c="",st=!1,me=1;;){E=de();var u=mr[C]();if(u)return u}}function de(){if(Qt[At])return String.fromCodePoint(Qt.codePointAt(At))}function n(){var u=de();return u===`
2
- `?(ge++,oe=0):u?oe+=u.length:oe++,u&&(At+=u.length),u}var mr={default:function(){switch(E){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
3
- `:case"\r":case"\u2028":case"\u2029":n();return;case"/":n(),C="comment";return;case void 0:return n(),_("eof")}if(O.isSpaceSeparator(E)){n();return}return mr[K]()},comment:function(){switch(E){case"*":n(),C="multiLineComment";return;case"/":n(),C="singleLineComment";return}throw S(n())},multiLineComment:function(){switch(E){case"*":n(),C="multiLineCommentAsterisk";return;case void 0:throw S(n())}n()},multiLineCommentAsterisk:function(){switch(E){case"*":n();return;case"/":n(),C="default";return;case void 0:throw S(n())}n(),C="multiLineComment"},singleLineComment:function(){switch(E){case`
4
- `:case"\r":case"\u2028":case"\u2029":n(),C="default";return;case void 0:return n(),_("eof")}n()},value:function(){switch(E){case"{":case"[":return _("punctuator",n());case"n":return n(),Pe("ull"),_("null",null);case"t":return n(),Pe("rue"),_("boolean",!0);case"f":return n(),Pe("alse"),_("boolean",!1);case"-":case"+":n()==="-"&&(me=-1),C="sign";return;case".":c=n(),C="decimalPointLeading";return;case"0":c=n(),C="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":c=n(),C="decimalInteger";return;case"I":return n(),Pe("nfinity"),_("numeric",1/0);case"N":return n(),Pe("aN"),_("numeric",NaN);case'"':case"'":st=n()==='"',c="",C="string";return}throw S(n())},identifierNameStartEscape:function(){if(E!=="u")throw S(n());n();var a=tr();switch(a){case"$":case"_":break;default:if(!O.isIdStartChar(a))throw dr();break}c+=a,C="identifierName"},identifierName:function(){switch(E){case"$":case"_":case"\u200C":case"\u200D":c+=n();return;case"\\":n(),C="identifierNameEscape";return}if(O.isIdContinueChar(E)){c+=n();return}return _("identifier",c)},identifierNameEscape:function(){if(E!=="u")throw S(n());n();var a=tr();switch(a){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!O.isIdContinueChar(a))throw dr();break}c+=a,C="identifierName"},sign:function(){switch(E){case".":c=n(),C="decimalPointLeading";return;case"0":c=n(),C="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":c=n(),C="decimalInteger";return;case"I":return n(),Pe("nfinity"),_("numeric",me*(1/0));case"N":return n(),Pe("aN"),_("numeric",NaN)}throw S(n())},zero:function(){switch(E){case".":c+=n(),C="decimalPoint";return;case"e":case"E":c+=n(),C="decimalExponent";return;case"x":case"X":c+=n(),C="hexadecimal";return}return _("numeric",me*0)},decimalInteger:function(){switch(E){case".":c+=n(),C="decimalPoint";return;case"e":case"E":c+=n(),C="decimalExponent";return}if(O.isDigit(E)){c+=n();return}return _("numeric",me*Number(c))},decimalPointLeading:function(){if(O.isDigit(E)){c+=n(),C="decimalFraction";return}throw S(n())},decimalPoint:function(){switch(E){case"e":case"E":c+=n(),C="decimalExponent";return}if(O.isDigit(E)){c+=n(),C="decimalFraction";return}return _("numeric",me*Number(c))},decimalFraction:function(){switch(E){case"e":case"E":c+=n(),C="decimalExponent";return}if(O.isDigit(E)){c+=n();return}return _("numeric",me*Number(c))},decimalExponent:function(){switch(E){case"+":case"-":c+=n(),C="decimalExponentSign";return}if(O.isDigit(E)){c+=n(),C="decimalExponentInteger";return}throw S(n())},decimalExponentSign:function(){if(O.isDigit(E)){c+=n(),C="decimalExponentInteger";return}throw S(n())},decimalExponentInteger:function(){if(O.isDigit(E)){c+=n();return}return _("numeric",me*Number(c))},hexadecimal:function(){if(O.isHexDigit(E)){c+=n(),C="hexadecimalInteger";return}throw S(n())},hexadecimalInteger:function(){if(O.isHexDigit(E)){c+=n();return}return _("numeric",me*Number(c))},string:function(){switch(E){case"\\":n(),c+=oa();return;case'"':if(st)return n(),_("string",c);c+=n();return;case"'":if(!st)return n(),_("string",c);c+=n();return;case`
5
- `:case"\r":throw S(n());case"\u2028":case"\u2029":ia(E);break;case void 0:throw S(n())}c+=n()},start:function(){switch(E){case"{":case"[":return _("punctuator",n())}C="value"},beforePropertyName:function(){switch(E){case"$":case"_":c=n(),C="identifierName";return;case"\\":n(),C="identifierNameStartEscape";return;case"}":return _("punctuator",n());case'"':case"'":st=n()==='"',C="string";return}if(O.isIdStartChar(E)){c+=n(),C="identifierName";return}throw S(n())},afterPropertyName:function(){if(E===":")return _("punctuator",n());throw S(n())},beforePropertyValue:function(){C="value"},afterPropertyValue:function(){switch(E){case",":case"}":return _("punctuator",n())}throw S(n())},beforeArrayValue:function(){if(E==="]")return _("punctuator",n());C="value"},afterArrayValue:function(){switch(E){case",":case"]":return _("punctuator",n())}throw S(n())},end:function(){throw S(n())}};function _(u,a){return{type:u,value:a,line:ge,column:oe}}function Pe(u){for(var a=0,p=u;a<p.length;a+=1){var s=p[a],d=de();if(d!==s)throw S(n());n()}}function oa(){var u=de();switch(u){case"b":return n(),"\b";case"f":return n(),"\f";case"n":return n(),`
6
- `;case"r":return n(),"\r";case"t":return n()," ";case"v":return n(),"\v";case"0":if(n(),O.isDigit(de()))throw S(n());return"\0";case"x":return n(),aa();case"u":return n(),tr();case`
7
- `:case"\u2028":case"\u2029":return n(),"";case"\r":return n(),de()===`
8
- `&&n(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw S(n());case void 0:throw S(n())}return n()}function aa(){var u="",a=de();if(!O.isHexDigit(a)||(u+=n(),a=de(),!O.isHexDigit(a)))throw S(n());return u+=n(),String.fromCodePoint(parseInt(u,16))}function tr(){for(var u="",a=4;a-- >0;){var p=de();if(!O.isHexDigit(p))throw S(n());u+=n()}return String.fromCodePoint(parseInt(u,16))}var na={start:function(){if(R.type==="eof")throw Ie();rr()},beforePropertyName:function(){switch(R.type){case"identifier":case"string":kt=R.value,K="afterPropertyName";return;case"punctuator":Ct();return;case"eof":throw Ie()}},afterPropertyName:function(){if(R.type==="eof")throw Ie();K="beforePropertyValue"},beforePropertyValue:function(){if(R.type==="eof")throw Ie();rr()},beforeArrayValue:function(){if(R.type==="eof")throw Ie();if(R.type==="punctuator"&&R.value==="]"){Ct();return}rr()},afterPropertyValue:function(){if(R.type==="eof")throw Ie();switch(R.value){case",":K="beforePropertyName";return;case"}":Ct()}},afterArrayValue:function(){if(R.type==="eof")throw Ie();switch(R.value){case",":K="beforeArrayValue";return;case"]":Ct()}},end:function(){}};function rr(){var u;switch(R.type){case"punctuator":switch(R.value){case"{":u={};break;case"[":u=[];break}break;case"null":case"boolean":case"numeric":case"string":u=R.value;break}if(ft===void 0)ft=u;else{var a=le[le.length-1];Array.isArray(a)?a.push(u):Object.defineProperty(a,kt,{value:u,writable:!0,enumerable:!0,configurable:!0})}if(u!==null&&typeof u=="object")le.push(u),Array.isArray(u)?K="beforeArrayValue":K="beforePropertyName";else{var p=le[le.length-1];p==null?K="end":Array.isArray(p)?K="afterArrayValue":K="afterPropertyValue"}}function Ct(){le.pop();var u=le[le.length-1];u==null?K="end":Array.isArray(u)?K="afterArrayValue":K="afterPropertyValue"}function S(u){return Ft(u===void 0?"JSON5: invalid end of input at "+ge+":"+oe:"JSON5: invalid character '"+cr(u)+"' at "+ge+":"+oe)}function Ie(){return Ft("JSON5: invalid end of input at "+ge+":"+oe)}function dr(){return oe-=5,Ft("JSON5: invalid identifier character at "+ge+":"+oe)}function ia(u){console.warn("JSON5: '"+cr(u)+"' in strings is not valid ECMAScript; consider escaping")}function cr(u){var a={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(a[u])return a[u];if(u<" "){var p=u.charCodeAt(0).toString(16);return"\\x"+("00"+p).substring(p.length)}return u}function Ft(u){var a=new SyntaxError(u);return a.lineNumber=ge,a.columnNumber=oe,a}var fa=function(a,p,s){var d=[],F="",x,J,N="",je;if(p!=null&&typeof p=="object"&&!Array.isArray(p)&&(s=p.space,je=p.quote,p=p.replacer),typeof p=="function")J=p;else if(Array.isArray(p)){x=[];for(var $e=0,ae=p;$e<ae.length;$e+=1){var ie=ae[$e],Y=void 0;typeof ie=="string"?Y=ie:(typeof ie=="number"||ie instanceof String||ie instanceof Number)&&(Y=String(ie)),Y!==void 0&&x.indexOf(Y)<0&&x.push(Y)}}return s instanceof Number?s=Number(s):s instanceof String&&(s=String(s)),typeof s=="number"?s>0&&(s=Math.min(10,Math.floor(s)),N=" ".substr(0,s)):typeof s=="string"&&(N=s.substr(0,10)),qe("",{"":a});function qe(b,q){var A=q[b];switch(A!=null&&(typeof A.toJSON5=="function"?A=A.toJSON5(b):typeof A.toJSON=="function"&&(A=A.toJSON(b))),J&&(A=J.call(q,b,A)),A instanceof Number?A=Number(A):A instanceof String?A=String(A):A instanceof Boolean&&(A=A.valueOf()),A){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof A=="string")return Et(A,!1);if(typeof A=="number")return String(A);if(typeof A=="object")return Array.isArray(A)?da(A):la(A)}function Et(b){for(var q={"'":.1,'"':.2},A={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},U="",ne=0;ne<b.length;ne++){var V=b[ne];switch(V){case"'":case'"':q[V]++,U+=V;continue;case"\0":if(O.isDigit(b[ne+1])){U+="\\x00";continue}}if(A[V]){U+=A[V];continue}if(V<" "){var Ne=V.charCodeAt(0).toString(16);U+="\\x"+("00"+Ne).substring(Ne.length);continue}U+=V}var ce=je||Object.keys(q).reduce(function(Be,Le){return q[Be]<q[Le]?Be:Le});return U=U.replace(new RegExp(ce,"g"),A[ce]),ce+U+ce}function la(b){if(d.indexOf(b)>=0)throw TypeError("Converting circular structure to JSON5");d.push(b);var q=F;F=F+N;for(var A=x||Object.keys(b),U=[],ne=0,V=A;ne<V.length;ne+=1){var Ne=V[ne],ce=qe(Ne,b);if(ce!==void 0){var Be=ma(Ne)+":";N!==""&&(Be+=" "),Be+=ce,U.push(Be)}}var Le;if(U.length===0)Le="{}";else{var xt;if(N==="")xt=U.join(","),Le="{"+xt+"}";else{var ca=`,
9
- `+F;xt=U.join(ca),Le=`{
10
- `+F+xt+`,
11
- `+q+"}"}}return d.pop(),F=q,Le}function ma(b){if(b.length===0)return Et(b,!0);var q=String.fromCodePoint(b.codePointAt(0));if(!O.isIdStartChar(q))return Et(b,!0);for(var A=q.length;A<b.length;A++)if(!O.isIdContinueChar(String.fromCodePoint(b.codePointAt(A))))return Et(b,!0);return b}function da(b){if(d.indexOf(b)>=0)throw TypeError("Converting circular structure to JSON5");d.push(b);var q=F;F=F+N;for(var A=[],U=0;U<b.length;U++){var ne=qe(String(U),b);A.push(ne!==void 0?ne:"null")}var V;if(A.length===0)V="[]";else if(N===""){var Ne=A.join(",");V="["+Ne+"]"}else{var ce=`,
12
- `+F,Be=A.join(ce);V=`[
13
- `+F+Be+`,
14
- `+q+"]"}return d.pop(),F=q,V}},sa={parse:ra,stringify:fa},Da=sa,pa=Da;return pa})});function Ca(){this.__data__=[],this.size=0}var _r=Ca;function Fa(e,t){return e===t||e!==e&&t!==t}var fe=Fa;function Ea(e,t){for(var r=e.length;r--;)if(fe(e[r][0],t))return r;return-1}var ve=Ea;var xa=Array.prototype,ga=xa.splice;function Ba(e){var t=this.__data__,r=ve(t,e);if(r<0)return!1;var o=t.length-1;return r==o?t.pop():ga.call(t,r,1),--this.size,!0}var Sr=Ba;function ha(e){var t=this.__data__,r=ve(t,e);return r<0?void 0:t[r][1]}var wr=ha;function ba(e){return ve(this.__data__,e)>-1}var Tr=ba;function ya(e,t){var r=this.__data__,o=ve(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}var Or=ya;function We(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}We.prototype.clear=_r;We.prototype.delete=Sr;We.prototype.get=wr;We.prototype.has=Tr;We.prototype.set=Or;var _e=We;function va(){this.__data__=new _e,this.size=0}var Pr=va;function _a(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var Ir=_a;function Sa(e){return this.__data__.get(e)}var jr=Sa;function wa(e){return this.__data__.has(e)}var Nr=wa;var Ta=typeof global=="object"&&global&&global.Object===Object&&global,bt=Ta;var Oa=typeof self=="object"&&self&&self.Object===Object&&self,Pa=bt||Oa||Function("return this")(),P=Pa;var Ia=P.Symbol,Z=Ia;var Lr=Object.prototype,ja=Lr.hasOwnProperty,Na=Lr.toString,Dt=Z?Z.toStringTag:void 0;function La(e){var t=ja.call(e,Dt),r=e[Dt];try{e[Dt]=void 0;var o=!0}catch{}var f=Na.call(e);return o&&(t?e[Dt]=r:delete e[Dt]),f}var Mr=La;var Ma=Object.prototype,Ra=Ma.toString;function Ga(e){return Ra.call(e)}var Rr=Ga;var Ua="[object Null]",Ha="[object Undefined]",Gr=Z?Z.toStringTag:void 0;function $a(e){return e==null?e===void 0?Ha:Ua:Gr&&Gr in Object(e)?Mr(e):Rr(e)}var re=$a;function qa(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var W=qa;var Va="[object AsyncFunction]",Wa="[object Function]",za="[object GeneratorFunction]",Ka="[object Proxy]";function Ja(e){if(!W(e))return!1;var t=re(e);return t==Wa||t==za||t==Va||t==Ka}var ze=Ja;var Ya=P["__core-js_shared__"],yt=Ya;var Ur=(function(){var e=/[^.]+$/.exec(yt&&yt.keys&&yt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function Xa(e){return!!Ur&&Ur in e}var Hr=Xa;var Za=Function.prototype,Qa=Za.toString;function ka(e){if(e!=null){try{return Qa.call(e)}catch{}try{return e+""}catch{}}return""}var Ae=ka;var en=/[\\^$.*+?()[\]{}|]/g,tn=/^\[object .+?Constructor\]$/,rn=Function.prototype,un=Object.prototype,on=rn.toString,an=un.hasOwnProperty,nn=RegExp("^"+on.call(an).replace(en,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fn(e){if(!W(e)||Hr(e))return!1;var t=ze(e)?nn:tn;return t.test(Ae(e))}var $r=fn;function sn(e,t){return e?.[t]}var qr=sn;function Dn(e,t){var r=qr(e,t);return $r(r)?r:void 0}var ee=Dn;var pn=ee(P,"Map"),Se=pn;var ln=ee(Object,"create"),Ce=ln;function mn(){this.__data__=Ce?Ce(null):{},this.size=0}var Vr=mn;function dn(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Wr=dn;var cn="__lodash_hash_undefined__",An=Object.prototype,Cn=An.hasOwnProperty;function Fn(e){var t=this.__data__;if(Ce){var r=t[e];return r===cn?void 0:r}return Cn.call(t,e)?t[e]:void 0}var zr=Fn;var En=Object.prototype,xn=En.hasOwnProperty;function gn(e){var t=this.__data__;return Ce?t[e]!==void 0:xn.call(t,e)}var Kr=gn;var Bn="__lodash_hash_undefined__";function hn(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ce&&t===void 0?Bn:t,this}var Jr=hn;function Ke(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}Ke.prototype.clear=Vr;Ke.prototype.delete=Wr;Ke.prototype.get=zr;Ke.prototype.has=Kr;Ke.prototype.set=Jr;var ur=Ke;function bn(){this.size=0,this.__data__={hash:new ur,map:new(Se||_e),string:new ur}}var Yr=bn;function yn(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Xr=yn;function vn(e,t){var r=e.__data__;return Xr(t)?r[typeof t=="string"?"string":"hash"]:r.map}var we=vn;function _n(e){var t=we(this,e).delete(e);return this.size-=t?1:0,t}var Zr=_n;function Sn(e){return we(this,e).get(e)}var Qr=Sn;function wn(e){return we(this,e).has(e)}var kr=wn;function Tn(e,t){var r=we(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}var eu=Tn;function Je(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}Je.prototype.clear=Yr;Je.prototype.delete=Zr;Je.prototype.get=Qr;Je.prototype.has=kr;Je.prototype.set=eu;var vt=Je;var On=200;function Pn(e,t){var r=this.__data__;if(r instanceof _e){var o=r.__data__;if(!Se||o.length<On-1)return o.push([e,t]),this.size=++r.size,this;r=this.__data__=new vt(o)}return r.set(e,t),this.size=r.size,this}var tu=Pn;function Ye(e){var t=this.__data__=new _e(e);this.size=t.size}Ye.prototype.clear=Pr;Ye.prototype.delete=Ir;Ye.prototype.get=jr;Ye.prototype.has=Nr;Ye.prototype.set=tu;var Te=Ye;var In="__lodash_hash_undefined__";function jn(e){return this.__data__.set(e,In),this}var ru=jn;function Nn(e){return this.__data__.has(e)}var uu=Nn;function _t(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new vt;++t<r;)this.add(e[t])}_t.prototype.add=_t.prototype.push=ru;_t.prototype.has=uu;var ou=_t;function Ln(e,t){for(var r=-1,o=e==null?0:e.length;++r<o;)if(t(e[r],r,e))return!0;return!1}var au=Ln;function Mn(e,t){return e.has(t)}var nu=Mn;var Rn=1,Gn=2;function Un(e,t,r,o,f,i){var D=r&Rn,l=e.length,m=t.length;if(l!=m&&!(D&&m>l))return!1;var g=i.get(e),B=i.get(t);if(g&&B)return g==t&&B==e;var h=-1,y=!0,M=r&Gn?new ou:void 0;for(i.set(e,t),i.set(t,e);++h<l;){var I=e[h],$=t[h];if(o)var j=D?o($,I,h,t,e,i):o(I,$,h,e,t,i);if(j!==void 0){if(j)continue;y=!1;break}if(M){if(!au(t,function(T,pe){if(!nu(M,pe)&&(I===T||f(I,T,r,o,i)))return M.push(pe)})){y=!1;break}}else if(!(I===$||f(I,$,r,o,i))){y=!1;break}}return i.delete(e),i.delete(t),y}var St=Un;var Hn=P.Uint8Array,Xe=Hn;function $n(e){var t=-1,r=Array(e.size);return e.forEach(function(o,f){r[++t]=[f,o]}),r}var iu=$n;function qn(e){var t=-1,r=Array(e.size);return e.forEach(function(o){r[++t]=o}),r}var fu=qn;var Vn=1,Wn=2,zn="[object Boolean]",Kn="[object Date]",Jn="[object Error]",Yn="[object Map]",Xn="[object Number]",Zn="[object RegExp]",Qn="[object Set]",kn="[object String]",ei="[object Symbol]",ti="[object ArrayBuffer]",ri="[object DataView]",su=Z?Z.prototype:void 0,or=su?su.valueOf:void 0;function ui(e,t,r,o,f,i,D){switch(r){case ri:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case ti:return!(e.byteLength!=t.byteLength||!i(new Xe(e),new Xe(t)));case zn:case Kn:case Xn:return fe(+e,+t);case Jn:return e.name==t.name&&e.message==t.message;case Zn:case kn:return e==t+"";case Yn:var l=iu;case Qn:var m=o&Vn;if(l||(l=fu),e.size!=t.size&&!m)return!1;var g=D.get(e);if(g)return g==t;o|=Wn,D.set(e,t);var B=St(l(e),l(t),o,f,i,D);return D.delete(e),B;case ei:if(or)return or.call(e)==or.call(t)}return!1}var Du=ui;function oi(e,t){for(var r=-1,o=t.length,f=e.length;++r<o;)e[f+r]=t[r];return e}var wt=oi;var ai=Array.isArray,te=ai;function ni(e,t,r){var o=t(e);return te(e)?o:wt(o,r(e))}var Tt=ni;function ii(e,t){for(var r=-1,o=e==null?0:e.length,f=0,i=[];++r<o;){var D=e[r];t(D,r,e)&&(i[f++]=D)}return i}var pu=ii;function fi(){return[]}var Ot=fi;var si=Object.prototype,Di=si.propertyIsEnumerable,lu=Object.getOwnPropertySymbols,pi=lu?function(e){return e==null?[]:(e=Object(e),pu(lu(e),function(t){return Di.call(e,t)}))}:Ot,Ze=pi;function li(e,t){for(var r=-1,o=Array(e);++r<e;)o[r]=t(r);return o}var mu=li;function mi(e){return e!=null&&typeof e=="object"}var L=mi;var di="[object Arguments]";function ci(e){return L(e)&&re(e)==di}var ar=ci;var du=Object.prototype,Ai=du.hasOwnProperty,Ci=du.propertyIsEnumerable,Fi=ar((function(){return arguments})())?ar:function(e){return L(e)&&Ai.call(e,"callee")&&!Ci.call(e,"callee")},pt=Fi;function Ei(){return!1}var cu=Ei;var Fu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Au=Fu&&typeof module=="object"&&module&&!module.nodeType&&module,xi=Au&&Au.exports===Fu,Cu=xi?P.Buffer:void 0,gi=Cu?Cu.isBuffer:void 0,Bi=gi||cu,Fe=Bi;var hi=9007199254740991,bi=/^(?:0|[1-9]\d*)$/;function yi(e,t){var r=typeof e;return t=t??hi,!!t&&(r=="number"||r!="symbol"&&bi.test(e))&&e>-1&&e%1==0&&e<t}var Pt=yi;var vi=9007199254740991;function _i(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=vi}var It=_i;var Si="[object Arguments]",wi="[object Array]",Ti="[object Boolean]",Oi="[object Date]",Pi="[object Error]",Ii="[object Function]",ji="[object Map]",Ni="[object Number]",Li="[object Object]",Mi="[object RegExp]",Ri="[object Set]",Gi="[object String]",Ui="[object WeakMap]",Hi="[object ArrayBuffer]",$i="[object DataView]",qi="[object Float32Array]",Vi="[object Float64Array]",Wi="[object Int8Array]",zi="[object Int16Array]",Ki="[object Int32Array]",Ji="[object Uint8Array]",Yi="[object Uint8ClampedArray]",Xi="[object Uint16Array]",Zi="[object Uint32Array]",w={};w[qi]=w[Vi]=w[Wi]=w[zi]=w[Ki]=w[Ji]=w[Yi]=w[Xi]=w[Zi]=!0;w[Si]=w[wi]=w[Hi]=w[Ti]=w[$i]=w[Oi]=w[Pi]=w[Ii]=w[ji]=w[Ni]=w[Li]=w[Mi]=w[Ri]=w[Gi]=w[Ui]=!1;function Qi(e){return L(e)&&It(e.length)&&!!w[re(e)]}var Eu=Qi;function ki(e){return function(t){return e(t)}}var Qe=ki;var xu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,lt=xu&&typeof module=="object"&&module&&!module.nodeType&&module,ef=lt&&lt.exports===xu,nr=ef&&bt.process,tf=(function(){try{var e=lt&&lt.require&&lt.require("util").types;return e||nr&&nr.binding&&nr.binding("util")}catch{}})(),Ee=tf;var gu=Ee&&Ee.isTypedArray,rf=gu?Qe(gu):Eu,ke=rf;var uf=Object.prototype,of=uf.hasOwnProperty;function af(e,t){var r=te(e),o=!r&&pt(e),f=!r&&!o&&Fe(e),i=!r&&!o&&!f&&ke(e),D=r||o||f||i,l=D?mu(e.length,String):[],m=l.length;for(var g in e)(t||of.call(e,g))&&!(D&&(g=="length"||f&&(g=="offset"||g=="parent")||i&&(g=="buffer"||g=="byteLength"||g=="byteOffset")||Pt(g,m)))&&l.push(g);return l}var jt=af;var nf=Object.prototype;function ff(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||nf;return e===r}var et=ff;function sf(e,t){return function(r){return e(t(r))}}var Nt=sf;var Df=Nt(Object.keys,Object),Bu=Df;var pf=Object.prototype,lf=pf.hasOwnProperty;function mf(e){if(!et(e))return Bu(e);var t=[];for(var r in Object(e))lf.call(e,r)&&r!="constructor"&&t.push(r);return t}var hu=mf;function df(e){return e!=null&&It(e.length)&&!ze(e)}var Oe=df;function cf(e){return Oe(e)?jt(e):hu(e)}var tt=cf;function Af(e){return Tt(e,tt,Ze)}var mt=Af;var Cf=1,Ff=Object.prototype,Ef=Ff.hasOwnProperty;function xf(e,t,r,o,f,i){var D=r&Cf,l=mt(e),m=l.length,g=mt(t),B=g.length;if(m!=B&&!D)return!1;for(var h=m;h--;){var y=l[h];if(!(D?y in t:Ef.call(t,y)))return!1}var M=i.get(e),I=i.get(t);if(M&&I)return M==t&&I==e;var $=!0;i.set(e,t),i.set(t,e);for(var j=D;++h<m;){y=l[h];var T=e[y],pe=t[y];if(o)var nt=D?o(pe,T,y,t,e,i):o(T,pe,y,e,t,i);if(!(nt===void 0?T===pe||f(T,pe,r,o,i):nt)){$=!1;break}j||(j=y=="constructor")}if($&&!j){var Ue=e.constructor,He=t.constructor;Ue!=He&&"constructor"in e&&"constructor"in t&&!(typeof Ue=="function"&&Ue instanceof Ue&&typeof He=="function"&&He instanceof He)&&($=!1)}return i.delete(e),i.delete(t),$}var bu=xf;var gf=ee(P,"DataView"),Lt=gf;var Bf=ee(P,"Promise"),Mt=Bf;var hf=ee(P,"Set"),Rt=hf;var bf=ee(P,"WeakMap"),Gt=bf;var yu="[object Map]",yf="[object Object]",vu="[object Promise]",_u="[object Set]",Su="[object WeakMap]",wu="[object DataView]",vf=Ae(Lt),_f=Ae(Se),Sf=Ae(Mt),wf=Ae(Rt),Tf=Ae(Gt),Ge=re;(Lt&&Ge(new Lt(new ArrayBuffer(1)))!=wu||Se&&Ge(new Se)!=yu||Mt&&Ge(Mt.resolve())!=vu||Rt&&Ge(new Rt)!=_u||Gt&&Ge(new Gt)!=Su)&&(Ge=function(e){var t=re(e),r=t==yf?e.constructor:void 0,o=r?Ae(r):"";if(o)switch(o){case vf:return wu;case _f:return yu;case Sf:return vu;case wf:return _u;case Tf:return Su}return t});var xe=Ge;var Of=1,Tu="[object Arguments]",Ou="[object Array]",Ut="[object Object]",Pf=Object.prototype,Pu=Pf.hasOwnProperty;function If(e,t,r,o,f,i){var D=te(e),l=te(t),m=D?Ou:xe(e),g=l?Ou:xe(t);m=m==Tu?Ut:m,g=g==Tu?Ut:g;var B=m==Ut,h=g==Ut,y=m==g;if(y&&Fe(e)){if(!Fe(t))return!1;D=!0,B=!1}if(y&&!B)return i||(i=new Te),D||ke(e)?St(e,t,r,o,f,i):Du(e,t,m,r,o,f,i);if(!(r&Of)){var M=B&&Pu.call(e,"__wrapped__"),I=h&&Pu.call(t,"__wrapped__");if(M||I){var $=M?e.value():e,j=I?t.value():t;return i||(i=new Te),f($,j,r,o,i)}}return y?(i||(i=new Te),bu(e,t,r,o,f,i)):!1}var Iu=If;function ju(e,t,r,o,f){return e===t?!0:e==null||t==null||!L(e)&&!L(t)?e!==e&&t!==t:Iu(e,t,r,o,ju,f)}var Nu=ju;function jf(e,t){return Nu(e,t)}var Nf=jf;var Lf="[object Symbol]";function Mf(e){return typeof e=="symbol"||L(e)&&re(e)==Lf}var Lu=Mf;function Rf(e,t){for(var r=-1,o=e==null?0:e.length,f=Array(o);++r<o;)f[r]=t(e[r],r,e);return f}var Mu=Rf;var Gf=1/0,Ru=Z?Z.prototype:void 0,Gu=Ru?Ru.toString:void 0;function Uu(e){if(typeof e=="string")return e;if(te(e))return Mu(e,Uu)+"";if(Lu(e))return Gu?Gu.call(e):"";var t=e+"";return t=="0"&&1/e==-Gf?"-0":t}var Hu=Uu;function Uf(e){return e}var Ht=Uf;var $u=Object.create,Hf=(function(){function e(){}return function(t){if(!W(t))return{};if($u)return $u(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})(),qu=Hf;function $f(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Vu=$f;function qf(e,t){var r=-1,o=e.length;for(t||(t=Array(o));++r<o;)t[r]=e[r];return t}var $t=qf;var Vf=800,Wf=16,zf=Date.now;function Kf(e){var t=0,r=0;return function(){var o=zf(),f=Wf-(o-r);if(r=o,f>0){if(++t>=Vf)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Wu=Kf;function Jf(e){return function(){return e}}var zu=Jf;var Yf=(function(){try{var e=ee(Object,"defineProperty");return e({},"",{}),e}catch{}})(),rt=Yf;var Xf=rt?function(e,t){return rt(e,"toString",{configurable:!0,enumerable:!1,value:zu(t),writable:!0})}:Ht,Ku=Xf;var Zf=Wu(Ku),Ju=Zf;function Qf(e,t){for(var r=-1,o=e==null?0:e.length;++r<o&&t(e[r],r,e)!==!1;);return e}var Yu=Qf;function kf(e,t,r){t=="__proto__"&&rt?rt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var ut=kf;var e0=Object.prototype,t0=e0.hasOwnProperty;function r0(e,t,r){var o=e[t];(!(t0.call(e,t)&&fe(o,r))||r===void 0&&!(t in e))&&ut(e,t,r)}var qt=r0;function u0(e,t,r,o){var f=!r;r||(r={});for(var i=-1,D=t.length;++i<D;){var l=t[i],m=o?o(r[l],e[l],l,r,e):void 0;m===void 0&&(m=e[l]),f?ut(r,l,m):qt(r,l,m)}return r}var se=u0;var Xu=Math.max;function o0(e,t,r){return t=Xu(t===void 0?e.length-1:t,0),function(){for(var o=arguments,f=-1,i=Xu(o.length-t,0),D=Array(i);++f<i;)D[f]=o[t+f];f=-1;for(var l=Array(t+1);++f<t;)l[f]=o[f];return l[t]=r(D),Vu(e,this,l)}}var Zu=o0;function a0(e,t){return Ju(Zu(e,t,Ht),e+"")}var Qu=a0;function n0(e,t,r){if(!W(r))return!1;var o=typeof t;return(o=="number"?Oe(r)&&Pt(t,r.length):o=="string"&&t in r)?fe(r[t],e):!1}var ku=n0;function i0(e){return Qu(function(t,r){var o=-1,f=r.length,i=f>1?r[f-1]:void 0,D=f>2?r[2]:void 0;for(i=e.length>3&&typeof i=="function"?(f--,i):void 0,D&&ku(r[0],r[1],D)&&(i=f<3?void 0:i,f=1),t=Object(t);++o<f;){var l=r[o];l&&e(t,l,o,i)}return t})}var eo=i0;function f0(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var to=f0;var s0=Object.prototype,D0=s0.hasOwnProperty;function p0(e){if(!W(e))return to(e);var t=et(e),r=[];for(var o in e)o=="constructor"&&(t||!D0.call(e,o))||r.push(o);return r}var ro=p0;function l0(e){return Oe(e)?jt(e,!0):ro(e)}var De=l0;function m0(e){return e==null?"":Hu(e)}var uo=m0;var d0=Nt(Object.getPrototypeOf,Object),ot=d0;var c0="[object Object]",A0=Function.prototype,C0=Object.prototype,oo=A0.toString,F0=C0.hasOwnProperty,E0=oo.call(Object);function x0(e){if(!L(e)||re(e)!=c0)return!1;var t=ot(e);if(t===null)return!0;var r=F0.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&oo.call(r)==E0}var ao=x0;function g0(e,t){return e&&se(t,tt(t),e)}var no=g0;function B0(e,t){return e&&se(t,De(t),e)}var io=B0;var po=typeof exports=="object"&&exports&&!exports.nodeType&&exports,fo=po&&typeof module=="object"&&module&&!module.nodeType&&module,h0=fo&&fo.exports===po,so=h0?P.Buffer:void 0,Do=so?so.allocUnsafe:void 0;function b0(e,t){if(t)return e.slice();var r=e.length,o=Do?Do(r):new e.constructor(r);return e.copy(o),o}var Vt=b0;function y0(e,t){return se(e,Ze(e),t)}var lo=y0;var v0=Object.getOwnPropertySymbols,_0=v0?function(e){for(var t=[];e;)wt(t,Ze(e)),e=ot(e);return t}:Ot,Wt=_0;function S0(e,t){return se(e,Wt(e),t)}var mo=S0;function w0(e){return Tt(e,De,Wt)}var co=w0;var T0=Object.prototype,O0=T0.hasOwnProperty;function P0(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&O0.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Ao=P0;function I0(e){var t=new e.constructor(e.byteLength);return new Xe(t).set(new Xe(e)),t}var at=I0;function j0(e,t){var r=t?at(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var Co=j0;var N0=/\w*$/;function L0(e){var t=new e.constructor(e.source,N0.exec(e));return t.lastIndex=e.lastIndex,t}var Fo=L0;var Eo=Z?Z.prototype:void 0,xo=Eo?Eo.valueOf:void 0;function M0(e){return xo?Object(xo.call(e)):{}}var go=M0;function R0(e,t){var r=t?at(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var zt=R0;var G0="[object Boolean]",U0="[object Date]",H0="[object Map]",$0="[object Number]",q0="[object RegExp]",V0="[object Set]",W0="[object String]",z0="[object Symbol]",K0="[object ArrayBuffer]",J0="[object DataView]",Y0="[object Float32Array]",X0="[object Float64Array]",Z0="[object Int8Array]",Q0="[object Int16Array]",k0="[object Int32Array]",es="[object Uint8Array]",ts="[object Uint8ClampedArray]",rs="[object Uint16Array]",us="[object Uint32Array]";function os(e,t,r){var o=e.constructor;switch(t){case K0:return at(e);case G0:case U0:return new o(+e);case J0:return Co(e,r);case Y0:case X0:case Z0:case Q0:case k0:case es:case ts:case rs:case us:return zt(e,r);case H0:return new o;case $0:case W0:return new o(e);case q0:return Fo(e);case V0:return new o;case z0:return go(e)}}var Bo=os;function as(e){return typeof e.constructor=="function"&&!et(e)?qu(ot(e)):{}}var Kt=as;var ns="[object Map]";function is(e){return L(e)&&xe(e)==ns}var ho=is;var bo=Ee&&Ee.isMap,fs=bo?Qe(bo):ho,yo=fs;var ss="[object Set]";function Ds(e){return L(e)&&xe(e)==ss}var vo=Ds;var _o=Ee&&Ee.isSet,ps=_o?Qe(_o):vo,So=ps;var ls=1,ms=2,ds=4,wo="[object Arguments]",cs="[object Array]",As="[object Boolean]",Cs="[object Date]",Fs="[object Error]",To="[object Function]",Es="[object GeneratorFunction]",xs="[object Map]",gs="[object Number]",Oo="[object Object]",Bs="[object RegExp]",hs="[object Set]",bs="[object String]",ys="[object Symbol]",vs="[object WeakMap]",_s="[object ArrayBuffer]",Ss="[object DataView]",ws="[object Float32Array]",Ts="[object Float64Array]",Os="[object Int8Array]",Ps="[object Int16Array]",Is="[object Int32Array]",js="[object Uint8Array]",Ns="[object Uint8ClampedArray]",Ls="[object Uint16Array]",Ms="[object Uint32Array]",v={};v[wo]=v[cs]=v[_s]=v[Ss]=v[As]=v[Cs]=v[ws]=v[Ts]=v[Os]=v[Ps]=v[Is]=v[xs]=v[gs]=v[Oo]=v[Bs]=v[hs]=v[bs]=v[ys]=v[js]=v[Ns]=v[Ls]=v[Ms]=!0;v[Fs]=v[To]=v[vs]=!1;function Jt(e,t,r,o,f,i){var D,l=t&ls,m=t&ms,g=t&ds;if(r&&(D=f?r(e,o,f,i):r(e)),D!==void 0)return D;if(!W(e))return e;var B=te(e);if(B){if(D=Ao(e),!l)return $t(e,D)}else{var h=xe(e),y=h==To||h==Es;if(Fe(e))return Vt(e,l);if(h==Oo||h==wo||y&&!f){if(D=m||y?{}:Kt(e),!l)return m?mo(e,io(D,e)):lo(e,no(D,e))}else{if(!v[h])return f?e:{};D=Bo(e,h,l)}}i||(i=new Te);var M=i.get(e);if(M)return M;i.set(e,D),So(e)?e.forEach(function(j){D.add(Jt(j,t,r,j,e,i))}):yo(e)&&e.forEach(function(j,T){D.set(T,Jt(j,t,r,T,e,i))});var I=g?m?co:mt:m?De:tt,$=B?void 0:I(e);return Yu($||e,function(j,T){$&&(T=j,j=e[T]),qt(D,T,Jt(j,t,r,T,e,i))}),D}var Po=Jt;var Rs=1,Gs=4;function Us(e){return Po(e,Rs|Gs)}var Hs=Us;function $s(e){return function(t,r,o){for(var f=-1,i=Object(t),D=o(t),l=D.length;l--;){var m=D[e?l:++f];if(r(i[m],m,i)===!1)break}return t}}var Io=$s;var qs=Io(),jo=qs;function Vs(e,t,r){(r!==void 0&&!fe(e[t],r)||r===void 0&&!(t in e))&&ut(e,t,r)}var dt=Vs;function Ws(e){return L(e)&&Oe(e)}var No=Ws;function zs(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var ct=zs;function Ks(e){return se(e,De(e))}var Lo=Ks;function Js(e,t,r,o,f,i,D){var l=ct(e,r),m=ct(t,r),g=D.get(m);if(g){dt(e,r,g);return}var B=i?i(l,m,r+"",e,t,D):void 0,h=B===void 0;if(h){var y=te(m),M=!y&&Fe(m),I=!y&&!M&&ke(m);B=m,y||M||I?te(l)?B=l:No(l)?B=$t(l):M?(h=!1,B=Vt(m,!0)):I?(h=!1,B=zt(m,!0)):B=[]:ao(m)||pt(m)?(B=l,pt(l)?B=Lo(l):(!W(l)||ze(l))&&(B=Kt(m))):h=!1}h&&(D.set(m,B),f(B,m,o,i,D),D.delete(m)),dt(e,r,B)}var Mo=Js;function Ro(e,t,r,o,f){e!==t&&jo(t,function(i,D){if(f||(f=new Te),W(i))Mo(e,t,D,r,Ro,o,f);else{var l=o?o(ct(e,D),i,D+"",e,t,f):void 0;l===void 0&&(l=i),dt(e,D,l)}},De)}var Go=Ro;var Ys=eo(function(e,t,r){Go(e,t,r)}),Xs=Ys;var Zs=0;function Qs(e){var t=++Zs;return uo(e)+t}var ks=Qs;function tD(e,t){if(e&1&&(G(0,"li",9)(1,"span",15),be(2,"i",16),X(),G(3,"span",17),ue(4),be(5,"br"),G(6,"small",18),ue(7),X()()()),e&2){let r=t.$implicit;H(4),Re(" ",r.name),H(3),Me(r.username)}}var kA=(()=>{class e{$activeModal=he(Bt);$api=he(vr);$toastr=he(br);$translate=he(hr);bridges=[];onRestartChildBridgeClick(){return Fr(this,null,function*(){try{for(let r of this.bridges)yield Er(this.$api.put(`/server/restart/${r.username}`,{}));this.$toastr.success(this.$translate.instant("plugins.manage.child_bridge_restart"),this.$translate.instant("toast.title_success"))}catch(r){console.error(r),this.$toastr.error(this.$translate.instant("plugins.manage.child_bridge_restart_failed"),this.$translate.instant("toast.title_error"))}finally{this.$activeModal.close()}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=gt({type:e,selectors:[["ng-component"]],inputs:{bridges:"bridges"},decls:27,vars:18,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"],[1,"fas","fa-power-off","primary-text","mb-3",2,"font-size","75px"],[1,"w-100"],[1,"text-center"],[1,"list-group","list-group-box","mb-0","w-75","mx-auto"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"],["type","button",1,"btn","btn-primary",3,"click"],[1,"me-3"],[1,"fas","fa-hap"],[1,"flex-grow-1","text-start"],[1,"grey-text","font-monospace"]],template:function(o,f){o&1&&(G(0,"div",0)(1,"div",1)(2,"h5",2),ue(3),Q(4,"translate"),X(),G(5,"button",3),Q(6,"translate"),ye("click",function(){return f.dismissModal()}),X()(),G(7,"div",4),be(8,"i",5),G(9,"p",6),ue(10),Q(11,"translate"),X(),G(12,"div",7)(13,"ul",8),gr(14,tD,8,2,"li",9,xr),X()()(),G(16,"div",10)(17,"div",11)(18,"button",12),Q(19,"translate"),ye("click",function(){return f.dismissModal()}),ue(20),Q(21,"translate"),X()(),be(22,"div",7),G(23,"div",13)(24,"button",14),ye("click",function(){return f.onRestartChildBridgeClick()}),ue(25),Q(26,"translate"),X()()()()),o&2&&(H(3),Me(k(4,6,"platform.version.service_restart_required")),H(2),Ve("aria-label",k(6,8,"form.button_close")),H(5),Me(k(11,10,"restart.child_bridge_list")),H(4),Br(f.bridges),H(4),Ve("aria-label",k(19,12,"form.button_close")),H(2),Re(" ",k(21,14,"form.button_close")," "),H(5),Re(" ",k(26,16,"menu.tooltip_restart")," "))},dependencies:[ht],encapsulation:2})}return e})();var iC=(()=>{class e{$activeModal=he(Bt);$router=he(yr);onRestartHomebridgeClick(){this.$router.navigate(["/restart"]),this.$activeModal.close()}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=gt({type:e,selectors:[["ng-component"]],decls:23,vars:18,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"],[1,"fas","fa-power-off","primary-text","mb-3",2,"font-size","75px"],[1,"mb-0"],[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",1,"btn","btn-primary",3,"click"]],template:function(o,f){o&1&&(G(0,"div",0)(1,"div",1)(2,"h5",2),ue(3),Q(4,"translate"),X(),G(5,"button",3),Q(6,"translate"),ye("click",function(){return f.dismissModal()}),X()(),G(7,"div",4),be(8,"i",5),G(9,"p",6),ue(10),Q(11,"translate"),X()(),G(12,"div",7)(13,"div",8)(14,"button",9),Q(15,"translate"),ye("click",function(){return f.dismissModal()}),ue(16),Q(17,"translate"),X()(),be(18,"div",10),G(19,"div",11)(20,"button",12),ye("click",function(){return f.onRestartHomebridgeClick()}),ue(21),Q(22,"translate"),X()()()()),o&2&&(H(3),Me(k(4,6,"platform.version.service_restart_required")),H(2),Ve("aria-label",k(6,8,"form.button_close")),H(5),Me(k(11,10,"plugins.settings.restart_required")),H(4),Ve("aria-label",k(15,12,"form.button_close")),H(2),Re(" ",k(17,14,"form.button_close")," "),H(5),Re(" ",k(22,16,"menu.tooltip_restart")," "))},dependencies:[ht],encapsulation:2})}return e})();function sC(e,{isDebugModeEnabled:t}){return{type:"object",required:["username"],additionalProperties:!1,title:e.instant("child_bridge.bridge_settings"),properties:Cr(Ar({username:{type:"string",title:e.instant("users.label_username"),description:`The child bridge username must be 6 pairs of colon-separated hexadecimal characters (A-F 0-9).
15
- Example: 0E:89:49:64:91:86.`,pattern:"^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$"},port:{type:"number",title:e.instant("accessories.bridge_port"),description:"The port the child bridge listens on.",minimum:1025,maximum:65534},pin:{type:"string",title:"Bridge PIN",description:`The child bridge pin.
16
- Example: 630-27-655.`,pattern:"^([0-9]{3}-[0-9]{2}-[0-9]{3})$"},name:{type:"string",title:e.instant("child_bridge.config.name"),description:"The name of the child bridge.",maxLength:64},manufacturer:{type:"string",title:e.instant("child_bridge.config.manufacturer"),description:"The child bridge manufacturer to be displayed in HomeKit.",maxLength:32},firmwareRevision:{type:"string",title:e.instant("child_bridge.config.firmware"),description:"The child bridge firmware version to be displayed in HomeKit.",maxLength:64},model:{type:"string",title:e.instant("child_bridge.config.model"),description:"The child bridge model to be displayed in HomeKit.",maxLength:32}},t?{debugModeEnabled:{type:"boolean",title:"Debug Mode",description:"Enable verbose logging for debugging."}}:{}),{env:{type:"object",title:"Environment Variables",description:"Environment variables to set for this child bridge.",properties:{DEBUG:{type:"string",title:"DEBUG",description:e.instant("settings.service.debug_tooltip")},NODE_OPTIONS:{type:"string",title:"NODE_OPTIONS",description:e.instant("settings.service.node_tooltip")}}}})}}export{Hs as a,Nf as b,Xs as c,ks as d,kA as e,iC as f,rD as g,sC as h};